Want to know when UIPickerViewDataSource finished
I save the last user selection in the picker view. But when the view is opened again I do not where to use
[pickerView selectRow:lastSelectedRow inComponent:lastSelectedComponent animated:YES];
If I use it in 开发者_如何学运维viewDidLoad
the problem is UIPickerViewDataSource
has not finished yet, so the scrolling is not correct.
I can not find delegate function after UIPickerViewDataSource
is finished.
Where can I use the above line of code?
You're passing YES
in animated argument, thus I assume you want to see it animated -> you should call this method in viewDidAppear
, not in viewDidLoad
.
精彩评论