Add better way to specify UIScrollView contentSize
| Originator: | davbeck | ||
| Number: | rdar://20300660 | Date Originated: | 25-Mar-2015 04:02 PM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | iOS 8.2 |
| Classification: | Enhancement | Reproducible: | Always |
Summary: Currently, there is no way to specify that a UIScrollView should use the content height based on auto layout, but keep the width the same as the width of the scroll views frame (or variable width and fixed height). Expected Results: Perhaps a dynamic constraint that differentiates between the bounds and the frame of a scroll view. Or simply 2 properties that cause the content width or height to match the frame. Or even 2 constraints (available through properties) with low priorities that match the frame to the bounds. With this solution, most constraints would just work, as long as it was greater than the content stretching resistance value. Actual Results: To achieve this, our options are currently to either specify contentSize manually (and update it any time constraints change) or to create a weird constraint where the left and right of a view are set to both the scroll views left and right and it’s superviews left and right.
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!