DLPickerView
github地址:https://github.com/coder-zwz/DLPickerView
一种支持单列数据选择,多列数据选择,开题报告,plist读取数据选择的多功能数据选择器,只需改变选择器NSArray数据源即可!InstallationCocoaPodsDLPickerView is available on CocoaPods. Just add the following to your project Podfile:
pod 'DLPickerView' # Podfile主要功能:多列数组数据源:多列数组数据源代码生成 DLPickerView *pickerView = [[DLPickerView alloc] initWithDataSource:@[@[@'Bei Jing',@'Shang Hai'], @[@'Li Lei',@'Han Meimei']] withSelectedItem:[sender.titleLabel.text componentsSeparatedByString:OwnerSeparator] withSelectedBlock:^(id selectedItem) { [sender setTitle:[selectedItem componentsJoinedByString:OwnerSeparator] forState:UIControlStateNormal]; } ]; [pickerView show]; 单列数组数据源:单列数组数据源代码生成 DLPickerView *pickerView = [[DLPickerView alloc] initWithDataSource:@[@'Man',@'Woman'] withSelectedItem:sender.titleLabel.text withSelectedBlock:^(id selectedItem) { [sender setTitle:selectedItem forState:UIControlStateNormal]; } ]; [pickerView show]; Plist读取数据源:Plist读取数据源代码生成 DLPickerView *pickerView = [[DLPickerView alloc] initWithPlistName:@'Time' withSelectedItem:[sender.titleLabel.text componentsSeparatedByString:TimeSeparator] withSelectedBlock:^(id selectedItem) { [sender setTitle:[selectedItem componentsJoinedByString:TimeSeparator] forState:UIControlStateNormal]; } ]; [pickerView show];,开题报告