Expose UIView.layoutMarginsFollowReadableWidth
| Originator: | zach | ||
| Number: | rdar://27161590 | Date Originated: | 04-Jul-2016 11:57 AM |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | iOS 10.0 (14A5261v) |
| Classification: | Enhancement | Reproducible: | Sometimes |
Summary: I'm building a UI framework to drive the semi-formulaic layout of our forms and informational pages. Some screens necessitate changing the layout margins of a cell, but otherwise showing the same content. Thus, I am driven to desire the toggle "Follow Readable Width" in IB, which changes the effective application of layoutMargins. This checkbox persists at runtime, i.e., if I manually use the layoutMargins property during layout. Turns out, you folks already have this! You're so good to me. Except it's SPI. Sad panda. Steps to Reproduce: 1. Attempt to bind constraints to the readableContentGuide without editing the constraints, like you can in IB. 2. Feel distraught. 3. Open an IB document as XML. 4. Use class-dump. 5. Feel even more distraught. Expected Results: I can use the layoutMarginsFollowReadableWidth attribute (like IB sets!). Actual Results: No such property is available in the header. I'm forced to setValueForKey(_:) to achieve the desired API without rearchitecting, which makes me want to take a shower. Version: iOS 10.0 (14A5261v) Notes: IB sets this value via its encoded properties, so the requested property is already a matter of ABI. You'd make me really happy if you gave it a retconned availability attribute to iOS 9, too. Configuration: iPhone 6s Plus 64GB T-Mobile, using Wi-Fi Attachments:
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!