I see different examples where constraints are set. Some set them in viewDidLoad
/ loadView
(after the subview was added). Others set them in the m
I have this solution to change constraints before those who are in the storyboard are loaded. This solution removes any lags after the view is loaded.
-(void)updateViewConstraints{
dispatch_async(dispatch_get_main_queue(), ^{
//Modify here your Constraint -> Activate the new constraint and deactivate the old one
self.yourContraintA.active = true;
self.yourContraintB.active= false;
//ecc..
});
[super updateViewConstraints]; // This must be the last thing that you do here -> if! ->Crash!
}