iam developing one app .In that i want to find out the iphone orientations.I written the code for that one.Is there any way to find out the simulator orientations.
Share
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.
Jeremy’s answer is missing an exceedingly important piece of information about
[[UIDevice currentDevice] orientation]– as per the Apple documents:Before you call
[[UIDevice currentDevice] orientation]you must first call[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications].When you’re done, you should also call
endGeneratingDeviceOrientationNotificationsat some point.However, it is worth noting that the simulator can at times fail to pass orientation changes through: I would strongly recommend testing your orientation changes on a device. There are edge cases you won’t see on the simulator that will definitely occur on actual hardware.