iOS顏色選擇器:KColorListPicker

jopen 10年前發布 | 29K 次閱讀 IOS iOS開發 移動開發

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.baiduhome.net/lib/view/home/1389343037867

 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!