How can I trigger an update to all the autolayout constraints?

Call those two methods on the view you want to be updated:

-setNeedsLayout
-layoutIfNeeded

The first one says to the layout system that this view needs to be laid out, because it has some changes and, everything should be recalculated. The second force the layout system to be run now, layout system is triggered at specific times during runtime, with this method you are saying:"do it now".


Yes There is a method on UIView called - (void)updateConstraintsIfNeeded

https://developer.apple.com/Library/ios/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#//apple_ref/occ/instm/UIView/updateConstraintsIfNeeded

However I don't think this is your problem

Tags:

Ios

Autolayout