Color-Picker-for-iOS

ColorPicker for iPhone and iPod touch

Github星跟蹤圖

HRColorPicker

HRColorPicker is a lightweight color picker for iOS
that's easy to use for both users and developers.

Try HRColorPicker

To try HRColorPicker, open Terminal.app and enter the following command:

$ pod try Color-Picker-for-iOS

How to use it

Podfile

platform :ios, '7.0'
pod "Color-Picker-for-iOS", "~> 2.0"

Install

$ pod install

Usage

colorPickerView = [[HRColorPickerView alloc] init];
colorPickerView.color = self.color;
[colorPickerView addTarget:self
                    action:@selector(action:)
          forControlEvents:UIControlEventValueChanged];
[self.view addSubview:colorPickerView];

HRColorPicker is optimized for Interface Builder and AutoLayout.

How to customize

Interface Builder

Layout, color, and tile size can be changed only through the Interface Builder.

Without Interface Builder

As shown below, you can also programmatically customize HRColorPicker.

colorPickerView.colorMapView.saturationUpperLimit = @1;

If you would like to change the layout, it is strongly recommended that you use the Interface Builder and AutoLayout.

Changing the UI components

If you would like to customize the user interface, HRColorPicker allows you to completely change out certain UI components.

@property (nonatomic, strong) IBOutlet UIView <HRColorInfoView> *colorInfoView;
@property (nonatomic, strong) IBOutlet UIControl <HRColorMapView> *colorMapView;
@property (nonatomic, strong) IBOutlet UIControl <HRBrightnessSlider> *brightnessSlider;

Create your custom UI class that implement protocol methods.

YourAwesomeBrightnessSlider *slider = [[YourAwesomeBrightnessSlider alloc] init];
[colorPickerView addSubview:slider];
colorPickerView.brightnessSlider = slider;

Lisence

  • new BSD License

Requirement

  • iOS7.x~

主要指標

概覽
名稱與所有者hayashi311/Color-Picker-for-iOS
主編程語言Swift
編程語言Ruby (語言數: 2)
平台
許可證Other
所有者活动
創建於2011-10-22 13:59:20
推送於2021-07-22 11:15:05
最后一次提交2021-02-04 00:12:16
發布數11
最新版本名稱3.0.2 (發布於 )
第一版名稱no-objc-arc (發布於 2012-09-23 19:12:34)
用户参与
星數830
關注者數31
派生數155
提交數175
已啟用問題?
問題數37
打開的問題數8
拉請求數17
打開的拉請求數2
關閉的拉請求數8
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?