ER: Companion API to systemLayoutSizeFittingSize: That Allows to Specify Priority
| Originator: | daniel | ||
| Number: | rdar://14145532 | Date Originated: | 13-Jun-2013 12:10 PM |
| Status: | Open | Resolved: | |
| Product: | iPhone SDK | Product Version: | Not Applicable |
| Classification: | Enhancement Request | Reproducible: | Not Applicable |
Summary When working with -[UIView systemLayoutSizeFittingSize:], one is currently required to toss additional required constraints into the mix, when e.g. calculating preferred heights for UITableViewCell instances in -[id<UITableViewDelegate> tableView:heightForRowAtIndexPath:]. While this is entirely feasible, it’d be nice to specify such things directly in one API call. Getting back to the tableViewCell example, I’d love to have something akin to the following on UIView: - (CGFloat)systemLayoutWidthForHeight:(CGFloat)height atPriority:(NSLayoutPriority)priority; - (CGFloat)systemLayoutHeightForWidth:(CGFloat)width atPriority:(NSLayoutPriority)priority; - (CGSize)systemLayoutSizeForSize:(CGSize)size atHorizontalPriority:(NSLayoutPriority)horizontalPriority verticalPriority:(NSLayoutPriority)verticalPriority;
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!
Addressed in iOS 8
I believe this has been addressed in iOS 8 with:
- (CGSize)systemLayoutSizeFittingSize:(CGSize) withHorizontalFittingPriority:(UILayoutPriority)priority verticalFittingPriority:(UILayoutPriority)priority;