Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HFColorPicker

A simple colorpicker for iOS.

Screenshot

How to use

In the InterfaceBuilder or Storyboard you just add a normal view element to your view and set the class to "HFColorPickerView". Then just connect the delegate to your ViewController.

Now you have import the HFColorPickerView.h in your ViewController and add the delegate.

//...
#import "HFColorPickerView.h"

@interface DemoTableViewController : UITableViewController <HFColorPickerViewDelegate>
//...

There is only one delegate method that needs to be implemented.

- (void)colorPicker:(HFColorPickerView *)colorPickerView selectedColor:(UIColor *)selectedColor;

These are the configuration properties for ColorPickerView:

_colorPickerView.colors = @[ [UIColor redColor], [UIColor blueColor], [UIColor greenColor], [UIColor yellowColor] ];

// optional:
_colorPickerView.topSpace = 5.0f;
_colorPickerView.buttonDiameter = 20.0f;
_colorPickerView.selectedIndex = 2;

License

This project is licensed under the MIT-License.

About

A simple colorpicker for iOS

Resources

Stars

34 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages