Changes

Jump to: navigation, search

An iOS 4 iPhone UIPickerView Example

No change in size, 15:09, 3 February 2011
UIPickerView Delegate and DataSource
* '''numberOfComponentsInPickerView:''' - Called by the PickerView to identify the number of components (i.e. selection wheels) that are to be displayed to the user.
* '''numberOfRowsInComponent:''' - Informs the PickerView of the number of rows (in other words the selection options) that are present in a specified component.
8 * '''titleForRow:''' - Called by the PickerView to identify the string that is to be displayed for a specified row in a specific component.
In addition to a data source, the PickerView also needs a mechanism for notifying the application code when a selection has been made by the user. It achieves this by calling the didSelectRow method of the class declared as the PickerView’s delegate.

Navigation menu