UIPickerView does not respect multiple component heights
| Originator: | sforteln | ||
| Number: | rdar://27927306 | Date Originated: | Aug 19, 2016 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 9.3 |
| Classification: | Reproducible: | Yes |
Summary:
In a UIPickerView with multiple components the datasource method
pickerView:rowHeightForComponent: is called for each component but all the components seem to get the largest height returned.
Steps to Reproduce:
See the attached Xcode project for an example.
Briefly
1. create a UIPickerView
2. set yourself as its delegate and dataSource
Implement the following methods
2. for numberOfComponentsInPickerView
return 3
3. for pickerView:numberOfRowsInComponent:
return 10
4. for pickerView:rowHeightForComponent:
return component 0 -> 20, 1 -> 40, 2 -> 100
5 . for pickerView(pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String?
return "r\(row) c\(component)"
Note that the components are all the same height
Expected Results:
The components would all respect the height for them returned by
pickerView:rowHeightForComponent:
Actual Results:
the components are all the same height
Version:
9.3
Notes:
Configuration:
iPhone5, iPhone6s sim
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!