I am developing an application which supports portrait and landscape modes
. I am using auto layout to arrange my views
. As i have been reading many posts and i have realized that developers commonly use one among the following approaches.
1. First approach:
Implement the UIViewController:updateConstraints
method and update constraints according to device orientation.
2. Second approach:
Implement the UIViewController:viewWillLayoutSubviews
method and update constraints according to device orientation.
Could anyone please tell me what is the best approach to use ? I have been searching for a best practice to combine autorotation and auto layout and nothing yet. Thanks.