jjzjj

classControl

全部标签

ios - UIPickerView 从 UISegmentedControl 更新

我正在尝试根据从UISegmentedControl选择的索引,使用不同的NSArray数据更新单个UIPickerView。目前,当我更改控件时,numberOfRowsInComponent不会更新,而titleForRow只会在滚动选择器时更新。NSArrays填充在viewDidLoad中,我在SegmentedControl的IBAction上使用reloadAllComponents方法。@synthesizesubnetView,classControl;-(NSInteger)numberOfComponentsInPickerView:(UIPickerView*)p