My app has very different UI structures for each orientation.
At what stage in the rotation lifecycle of an iPad should I remove, then add the orientation’s UI to ensure the smoothest transition?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When handling autorotation, you have 4 main methods to care about:
Now, the way I handle the rotation is, e.g.:
adjust all the frames in
willAnimateRotationToInterfaceOrientation;add/remove subviews (if needed) in
willRotateToInterfaceOrientation;restore subviews (if needed) in
didRotateFromInterfaceOrientation.More in general, I modify all properties that are animatable in
willAnimateRotationToInterfaceOrientation; while I do all modifications that are not animatable inwillRotateToInterfaceOrientation/didRotateFromInterfaceOrientation.This is what the UIViewController reference says about
willRotate/didRotate: