我有一个带有2个UIPickerViews的viewcontroller,我以编程方式创建(No IB)。它们都是文本字段的输入,如下所示:
UIPickerView *heightPicker = [[UIPickerView alloc] initWithFrame:CGRectZero];
heightPicker.delegate = self;
heightPicker.dataSource = self;
[heightPicker setShowsSelectionIndicator:YES];
heightPicker.tag = 0;
self.heightField.inputView = heightPicker;
[heightPicker release];
如何设置这些选择器的默认选择?在用户点击相关文本字段之前,它们甚至不会被填充。