Reputation: 10984
I have 2 segment UIPickerView one is having number and second "Quantity"
Both segment has None as their first index.
what i m trying to do is, whenever i choose None(first element) from an of the segment, the respective, first element of the other segment should also move to None(which is first element,automatically.) Makes sense??
Guidance needed
Upvotes: 0
Views: 180
Reputation: 42574
This is pretty simple, here's the code:
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
if (row == 0) {
[pickerView selectRow:0 inComponent:((component+1)%1) animated:YES];
}
}
Upvotes: 1