iOS颜色选择器:KColorListPicker

jopen 11年前

KColorListPicker 是一款 iOS 7.0 及以上的 Crayola 颜色列表选择器。

iOS颜色选择器:KColorListPicker

用法

首先

#import "KKColorListPicker.h" 

然后在你的控制器,例如:

- (IBAction)PresentColorList:(id)sender {      KKColorListViewController *controller = [[KKColorListViewController alloc] initWithSchemeType:KKColorsSchemeTypePantone];      controller.delegate = self;      [self presentViewController:controller animated:YES completion:nil];  }

委托方法获取选择的颜色:

- (void)colorListController:(KKColorListViewController *)controller didSelectColor:(KKColor *)color;

你可以简单地定义外观颜色列表控制器:

@property (nonatomic, strong) NSString *headerTitle;  @property (nonatomic, strong) UIColor *selectedCellBorderColor;  @property (nonatomic, assign) CGFloat selectedCellBorderWidth;  @property (nonatomic, strong) UIColor *backgroundColor;

项目主页:http://www.open-open.com/lib/view/home/1389343037867