ActionSheetPicker

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_第1张图片


ActionSheetPicker_第2张图片


ActionSheetPicker_第3张图片


ActionSheetPicker_第4张图片

你可能感兴趣的:(ActionSheetPicker)