UIPickerView selectRow will not select the last row

Originator:liggitt
Number:rdar://14040136 Date Originated:2013-05-31
Status:Open Resolved:
Product:iPhone SDK Product Version:6.1
Classification:Bug Reproducible:Always
 
Summary:
In an application that makes use of autolayout, set up a UIPickerView with 10 rows. If the method selectRow:inComponent:animated: is called from viewDidLoad or viewWillAppear, the the picker will not successfully select the last row, but will display the next-to-last row.

Steps to Reproduce:
1. Create a project with a UIPickerView contained in a nib that uses autolayout
2. Assign a data source that provides 10 rows.
3. In viewWillAppear, select the last row


Expected Results:
The selected row is displayed

Actual Results:
The view appears with the next to last row selected. All other rows can be selected successfully.

Regression:

Notes:
Calling selectRow: from viewDidAppear selects the row properly, but the UIPickerView either jumps or rotates to the correct row, which doesn't look good

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!