-(NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component
对于上述方法,-(NSString *)pickerView
代表什么,(UIPickerView *)pickerView
代表什么,在这些方面,pickerView的含义是什么?
-(NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component
,对这种方法也有同样的疑虑。
如果我知道这些内部协议方法,我将很高兴,帮助我。
答案 0 :(得分:0)
// returns the number of 'columns' to display.
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView;
// returns the # of rows in each component..
- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component;
答案 1 :(得分:0)
在方法中:-(NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component
,
NSString
是该方法的 return 类型。(UIPickerView *)
是pickerView
实例变量的类类型。pickerView:titleForRow:forComponent