0
我在我的應用程序中使用UIpickerview。問題是我的pickerview titleforrow
函數總是返回3行,儘管numberofRowsinComponent
返回更多行。行爲pickerview titleForRow總是從2開始
- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:
(NSInteger)component {
return [filteredTerms count]; }
- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:
(NSInteger)row forComponent:(NSInteger)component {
CreateOrder *order = [filteredTerms objectAtIndex:row];
NSString *title;
title = order.kBranchName;
return title; }
我甚至試圖硬編碼返回的數字或行,但它不工作。該titleforrow
行始終從2
你怎麼知道它開始2? – 2011-05-26 11:13:45