I have the following issue (with iPhone SDK) : The selectedRowInComponent method of UIPickerView returns the correct value the first time it is 开发者_StackOverflow中文版called and then keeps returning the same value eventhough the PickerView object has been moved.
The first time answer is correct even if I make a first move before calling the method.
Any idea for the possible cause of the problem ?
Thanks.
One possible cause for this issue is not making a connection in interface builder to the picker. Ensure you have an IBOutlet for your picker then drag from File's Owner to the picker in the xib file. Select the picker in the menu that pops up. Thats the obvious solution, however without viewing the code its hard to tell for sure what is going on. Hope this helps.
精彩评论