开发者

Row selection does not call didSelectRow after reloading all components in that UIPickerView

Let's say for instance that I have a UIPickerView in my ViewController. Upon launch I use this code here:

[picker selectRow:3 inComponent:0 animated:NO];

After selecting the row that I want, why doesn't it trigger the didSelectRow code?

- (void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSIn开发者_StackOverflowteger)row inComponent:(NSInteger)component {}

Any ideas on why this is and how to fix this? Thanks


My solution to fix this was to just add a blank row and the picker loaded to the blank row. This forces the user to slide the UIPickerView so the didSelectRow get triggered.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜