开发者

pickerview issue

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜