开发者

pickerview issue

开发者 https://www.devze.com 2023-02-22 07:59 出处:网络
I have 2 segment UIPickerView one is having number and second \"Quantity\" Both segment has None as their first index.

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, w开发者_C百科henever 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


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];
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消