What’s the difference between UIDeviceOrientation & UIInterfaceOrientation ?
Which one should I use to detect rotation on a UIView?
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.
UIDeviceOrientationgives you information about the physical device itself whileUIInterfaceOrientationtells you about the orientation of the views it is displaying. These do not need to match; when a user uses the orientation lock or if the the device orientation is face up.You probably want to be checking
UIInterfaceOrientationand the rotation methods onUIViewControllerto determine when views have been or should be rotated.