Conforms to NSObject
Declared in CCControlPicker.h

Overview

The delegate of a CCControlPicker object must adopt this protocol and implement at least some of its methods to provide the control picker with the data it needs to construct itself.

Typically the delegate implements optional methods to respond to new selections or deselections of component rows.

See CCControlPicker Class Reference for a discussion of components, rows, row content, and row selection.

Tasks

Setting the Dimensions of the Control Picker's row

Responding to Row Selection

Instance Methods

controlPicker:didSelectRow:

Called by the control picker when the user selects a row.

- (void)controlPicker:(CCControlPicker *)controlPicker didSelectRow:(NSUInteger)row

Parameters

controlPicker

An object representing the control picker view requesting the data.

row

A zero-indexed number identifying a row of component. Rows are numbered top-to-bottom.

Discussion

To determine what value the user selected, the delegate uses the row index to access the value at the corresponding position in the array used to construct the component.

Declared In

CCControlPicker.h

rowSizeForControlPicker:

Called by the control picker when it needs the row size to use for drawing row content.

- (CGSize)rowSizeForControlPicker:(CCControlPicker *)controlPicker

Parameters

controlPicker

The control picker requesting this information.

Return Value

A CGSize indicating the size of the row in points.

Declared In

CCControlPicker.h