NSLayoutConstraint's isActive should be exposed in Interface Builder as a dropdown
| Originator: | keithbsmiley | ||
| Number: | rdar://34732035 | Date Originated: | 28-Sep-2017 22:14 |
| Status: | Duplicate of 20439085 (open) | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 9.0 9A235 |
| Classification: | UI/Usability | Reproducible: | Always |
Summary:
Right now if you want to deactivate a constraint in interface builder (and then activate it later in code) you have to use a custom IBInspectable that trampolines the setting through to the actual value. It would be great if this was natively exposed to users in Interface Builder
Steps to Reproduce:
1. Try to set isActive on a NSLayoutConstraint in a storyboard
Expected Results:
There's a dropdown to set this value
Actual Results:
There's no way to set this value without defining a custom IBInspectable
Version:
Xcode 9.0 9A235
Notes:
Here's an example of a working inspectable for this case:
```
public extension NSLayoutConstraint {
@IBInspectable public var isActivated: Bool {
get { return self.isActive }
set { self.isActive = newValue }
}
}
```
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!