CWColorWheel Documentation Center

Table of Contents

CWColorPickerViewController Class Reference

CWColorPickerViewController Class Reference

Overview

Use this class to display the color wheel. Future versions may support multiple types of color pickers.

CWColorPickerViewController

Properties

CWColorPickerViewControllerDelegate

Methods

CWColorPickerViewController

delegate

The delegate for this color picker.

@property (nonatomic) id<CWColorPickerViewControllerDelegate>delegate
Type
id<CWColorPickerViewControllerDelegate>
Attributes
nonatomic
Discussion
Set the delegate in order to get events about when a color is picked and when it is changed.

color

Set or get the current color for the color picker.

@property (nonatomic) UIColor *color
Type
UIColor *
Attributes
nonatomic
Discussion
Setting this updates the color picker's UI

CWColorPickerViewControllerDelegate

colorPicker:pickedColor:

The callback when the user taps the 'done' button.

- (void)colorPicker:(CWColorPickerViewController *)cp pickedColor:(UIColor *)color
Parameters
cp
Type: CWColorPickerViewController *
color
Type: UIColor *
Return Value
Type: void
Discussion
One needs to manually dismiss this viewcontroller, usually after this method is called.

colorPicker:colorChanged:

The callback when the user changes the color (when he taps on the color wheel or moves his finger).

- (void)colorPicker:(CWColorPickerViewController *)cp colorChanged:(UIColor *)color
Parameters
cp
Type: CWColorPickerViewController *
color
Type: UIColor *
Return Value
Type: void
Discussion
This gets called often, so don't do any heavy lifting here!