I have a game in which the orientation of the device affects the state of the game. The user must quickly switch between Landscape, Portrait, and Reverse Landscape orientations. So far I've been registering the game for orientation notifications via:
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
But it is far too slow – there seems to be about a second delay between rotating the phone and the notification actually being fired. I need a way to INSTANTLY detect changes in the device's orientation. I have tried experimenting with the gyroscope, but am not yet familiar enough with it to know whether or not it is the solution I am looking for.
Best Answer
Add a notifier in the
viewWillAppear
functionThe orientation change notifies this function
which in-turn calls this function where the moviePlayerController frame is orientation is handled
in
viewDidDisappear
remove the notificationI guess this is the fastest u can have changed the view as per orientation