Auto Layout error Auto Layout error ios ios

Auto Layout error


I had this issue recently, when I wanted to programmatically adjust frame of the view created by storyboard, by providing a viewDidLayoutSubviews message handler. Following the instruction from exception message, I tried to add [self.view layoutIfNeeded] at the end of -viewDidLayoutSubviews, and then it worked.