Is there any programatic way to temporarily disable an auto-layout constraint? I do not want that constraint to be considered for a certain period of time at all until I need it again.
See Question&Answers more detail:osIs there any programatic way to temporarily disable an auto-layout constraint? I do not want that constraint to be considered for a certain period of time at all until I need it again.
See Question&Answers more detail:osWhen developing for iOS 8.0 or later, just use isActive
property of NSLayoutConstraint
after creating your IBOutlet.
UPDATED
your cell would have the following outlet:
@IBOutlet var photoBottomConstraint: NSLayoutConstraint!
and you would access the constraint in willDisplayCell
like:
myCell.photoBottomConstraint.isActive = false
and when you need it again:
myCell.photoBottomConstraint.isActive = true