I had an app which plays videos from a web server but it just plays in landscape orientation. I want my app to use the accelerometer to play my videos both in landscape and in portrait orientation. I want my video playback feature to look like the youtube app in the iPhone. Can anyone please help me how to do this? thanks
Share
For this you do not need the accelerometer. Instead you listen to the notifications from the UIDevice singleton instance that are sent when the orientation changes. In your “application didFinishLaunching withOptions” method, type this:
then create this method to handle the orientation change: