Conforms to NSObject
Declared in CCControlPicker.h

Overview

The CCControlPickerDataSource protocol must be adopted by an object that mediates between a CCControlPicker object and your application’s data model for that control picker. The data source provides the control picker with the number of components, and the number of rows in the component, for displaying the control picker data. Both methods in this protocol are required.

Tasks

Providing Counts for the Control Picker

Setting the Content of Component Rows

Instance Methods

controlPicker:nodeForRow:

Called by the picker control when it needs the node to use for a given row.

- (CCControlPickerRow *)controlPicker:(CCControlPicker *)controlPicker nodeForRow:(NSUInteger)row

Parameters

controlPicker

An object representing the control picker requesting the data.

row

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

Return Value

The node to use as the visual representation of the indicated row.

Declared In

CCControlPicker.h

numberOfRowsInControlPicker:

Called by the picker control when it needs the number of rows. (required)

- (NSUInteger)numberOfRowsInControlPicker:(CCControlPicker *)controlPicker

Parameters

controlPicker

The picker control requesting the data.

Return Value

The number of rows.

Discussion

Called by the picker control when it needs the number of rows. (required)

Declared In

CCControlPicker.h