ActionSheetPicker

作者: petter102 | 来源:发表于2016-05-18 16:51 被阅读0次

ActionSheetPicker = UIPickerView + UIActionSheet

项目地址:https://github.com/skywinder/ActionSheetPicker-3.0

ActionSheetPicker是一个选择器样式如下

ActionSheetPiker

现有的四种样式:ActionSheetStringPicker,ActionSheetDistancePicker,ActionSheetDatePicker, andActionSheetCustomPicker

// Inside a IBAction method:// Create an array of strings you want to show in the picker:NSArray*colors = [NSArrayarrayWithObjects:@"Red",@"Green",@"Blue",@"Orange",nil];[ActionSheetStringPickershowPickerWithTitle:@"Select a Color"rows:colorsinitialSelection:0doneBlock:^(ActionSheetStringPicker *picker,NSIntegerselectedIndex,idselectedValue) {NSLog(@"Picker:%@, Index:%@, value:%@",                                      picker, selectedIndex, selectedValue);                                    }cancelBlock:^(ActionSheetStringPicker *picker) {NSLog(@"Block Picker Canceled");                                    }origin:sender];// You can also use self.view if you don't have a sender

相关文章

网友评论

    本文标题:ActionSheetPicker

    本文链接:https://www.haomeiwen.com/subject/mrbbrttx.html