Instance Method

pickerView:didSelectRow:inComponent:

Called by the picker view when the user selects a row in a component.

Declaration

- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component;

Parameters

pickerView

An object representing the picker view requesting the data.

row

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

component

A zero-indexed number identifying a component of pickerView. Components are numbered left-to-right.

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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software