I\'m developing an app for iOS and I\'m using the Storyboard with AutoLayout ON. One of my view controllers has a set of 4 buttons, and in certain circumstances i would like
This question is pretty old but the closet thing I've found is setting additional constraints (so the views around the "gone" view know what to do once it's missing)
A which you want to be A
| after setting B to gone |
B C
|
C
bConstraints. Do this by:
bConstraints.@IBOutlet var bConstraints: [NSLayoutConstraint]! in your ViewControllerThen hide B
B.hidden = true
NSLayoutConstraint.deactivateConstraints(bConstraints)
To unhide
B.hidden = false
NSLayoutConstraint.activateConstraints(bConstraints)
Obviously the more and more views you have the more complex this grows, as you need additional constraints from each view