Iphone 更新uipicker
我有两列,在uipicker中。当我从第一列中选择某个内容时,我希望在另一列中更改选项 源代码有人吗Iphone 更新uipicker,iphone,uipicker,Iphone,Uipicker,我有两列,在uipicker中。当我从第一列中选择某个内容时,我希望在另一列中更改选项 源代码有人吗 多谢大家查看Apress的《iPhone4开发》一书,在第7章中有一个独立的选取器,就是你想要制作的(它被称为独立的uipickerview)。试试这样的东西- - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)componen
多谢大家查看Apress的《iPhone4开发》一书,在第7章中有一个独立的选取器,就是你想要制作的(它被称为独立的uipickerview)。试试这样的东西-
- (void)pickerView:(UIPickerView *)pickerView
didSelectRow:(NSInteger)row
inComponent:(NSInteger)component {
if (component == 0) {
//Here First Part of the Pickerview is represented using 0.
// dependentPicker is the Pickerview outlet
[dependentPicker selectRow:row inComponent:1 animated:YES];
[dependentPicker reloadComponent:1];
}
else
{
[dependentPicker selectRow:row inComponent:0 animated:YES];
[dependentPicker reloadComponent:1];
}
}
看看这个答案-