1。protocol : <UIPickViewDataSource>
myPicker.dataSource = self ; //源
方法:-(NSInteger) numberOfComponentsInPickerView: (UIPickerView *) pickerView; //显示的列数
-(NSInteger) pickerView : (UIPickerView *) pickerView
numberOfRowsInComponent : (NSInteger) component ; //每列显示的行数
2。protocol : < UIPickViewDelegate>
myPicker.delegate= self ;
方法:-(NSString *)pickerView : (UIPickerView *)pickerView //某列某行显示的文本, row is zero-based
titleForRow : (NSInteger) row forComponent : (NSInteger) component ;
3。其它:
ios6 : showsSelectionIndicator 选择时高亮显示
方法:selectedRowInComponent : //某列当前选中项索引
reloadAllComponents / reloadComponent : //指定列重新加载数据

被折叠的 条评论
为什么被折叠?



