iOS pickerView

来源:互联网 发布:linux和win7双系统 编辑:程序博客网 时间:2024/04/28 20:51

1.有几组

- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView


2.每组有几行

- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component


3.显示内容

- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view


4.滚动到某行做什么

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


5.view的高度

- (CGFloat)pickerView:(UIPickerView *)pickerView rowHeightForComponent:(NSInteger)component


6.view的宽度

- (CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component



0 0
原创粉丝点击