Giter VIP home page Giter VIP logo

color-picker-for-ios's Introduction

HRColorPicker

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

Video

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~

color-picker-for-ios's People

Contributors

akutsuacts avatar hayashi311 avatar katsuyoshi avatar s1tnk avatar snickers0129 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.