Xcode 6.4: Feature parity between UIView and NSView on introspectability of Interface Builder prototyping constraints.
| Originator: | aralbalkan | ||
| Number: | rdar://21887757 | Date Originated: | 18-Jul-2015 03:18 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 6.4 (6E35b) |
| Classification: | Enhancement | Reproducible: | Always |
Summary: Prototyping constraints can be introspected (and removed) in UIView but not in NSView. Removing prototyping constraints is essential when you have a custom component that you want people to be able to position visually (intuitively) in IB but where you want to create the constraints yourself (e.g., to align it in relation to another component). Steps to Reproduce: 1. On an iOS project: Run this code on a view (UIView) that has subviews that have been instantiated in IB but have not had any explicit (user) constraints applied to them: println(self.constraints()) 2. On a similar Cocoa project with a similar view (but NSView, this time): println(self.constraints) Expected results: Both output should show the prototyping constraints. Actual results: Only the UIView example shows the prototyping constraints. Notes: See http://www.cocoanetics.com/2015/06/proportional-layout-with-swift/ for a discussion of why it is important that we have the option to remove prototyping constraints. Not being able to do that on Cocoa makes it more difficult to work with IB and constraints.
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!