初始化
self.sunDataPicker =[[SunDataPicker alloc]initWithFrame:CGRectMake(0, 100,Width-20 , (Width-20)*2/3)];
self.sunDataPicker.title.text=@"请选择";
数据NSDictionary *dic = @{@"1":@{@"1":@[@"1",@"2",@"3"],@"2":@[@"1",@"2",@"3"],@"3":@[@"1",@"2",@"3"]},@"2":@{@"1":@[@"1",@"2",@"3"],@"2":@[@"1",@"2",@"3"],@"3":@[@"1",@"2",@"3"]},@"3":@{@"1":@[@"1",@"2",@"3"],@"2":@[@"1",@"2",@"3"],@"3":@[@"1",@"2",@"3"]}};
__weak ViewController *weakSelf = self;
[self.sunDataPicker setNumberOfComponents:3 SET:dic addTarget:self.view Complete:^(NSString *one, NSString *two, NSString *three) {
NSLog(@"%@-%@-%@",one,two,three);
weakSelf.labe.text = [NSString stringWithFormat:@"%@-%@-%@",one,two,three];
}];
代码放在github上: https://github.com/souprock/linkage