Κυριακή, 17 Φεβρουαρίου 2013

2 column pickerview



Make your controller (or whatever is controlling the behavior of the PickerView) support the UIPickerViewDelegate protocol. Then, implement:
- (int) numberOfColumnsInPickerView:(UIPickerView*)picker
to return the number of columns you want, and
- (int) pickerView:(UIPickerView*)picker numberOfRowsInColumn:(int)col
to return the number of rows for each column, and finally:
- (UIPickerTableCell*) pickerView:(UIPickerView*)picker tableCellForRow:(int)row inColumn:(int)col
to setup each cell.
See the reference for UIPickerView and UIPickerViewDelegate.
A decent code example is here.

Δεν υπάρχουν σχόλια:

Δημοσίευση σχολίου