Autolayout and Device Orientation

后端 未结 4 1681
灰色年华
灰色年华 2021-01-05 09:51

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

4条回答
  •  情话喂你
    2021-01-05 10:22

    I believe that the best approach is to update the constraints in -(void)updateViewConstraints by checking the device orientation. There is no need to call setNeedsUpdateConstraints in willAnimateRotationToInterfaceOrientation because it is automatically called by the iOs when the device orientation changes. Thank you all for the great effort.

提交回复
热议问题