這裏我增加了pickerview programaticly如何給這個選擇器查看數據源
- (void)viewDidLoad {
[super viewDidLoad];
CGRect pickerFrame = CGRectMake(0,280,321,200);
UIPickerView *myPickerView = [[UIPickerView alloc] init]; //Not sure if this is the proper allocation/initialization procedure
//Set up the picker view as you need it
//Set up the display frame
myPickerView.frame = pickerFrame; //I recommend using IB just to get the proper width/height dimensions
//Add the picker to the view
[self.view addSubview:myPickerView];
}
但現在我需要真正有它顯示的內容,不知怎麼找到時,它改變了什麼價值已更改爲。我該怎麼做呢?
看看在UIPickerView數據源和委託的xcode文檔。 – MCannon 2011-03-21 20:03:54