Reputation:
HI All
i am using the device orientation for some functionality like as
in stating the as we run the app it should be in the landscape mode and in this mode if we orientate the phone in 90 angle than it should play some video than problem comes video play by default in the landscape mode but we need it in the portrait mode than for playing video in the portrait mode we put the code
[ mPlayer setOrientation:UIDeviceOrientationPortrait animated:NO];
like this even this method show a warning but it do work for playing the video in the portrait mode.
now what is the problem :-as we start the app the screen we were showing in the starting of the app just comes and disaapper and it just starts playing the video and not come to that screen we even use the default rotation function to make it usable but it doesn't work
any suggestion thanks Balraj Verma
Upvotes: 0
Views: 1001
Reputation: 3155
The method setOrientation is a private API (SDK 3.2) and should not be used.
Instead change the coordinate system with:
self.view.transform = CGAffineTransformMakeRotation(-M_PI/2);
Of course you may have to add some code before and after but I let you find some examples on StackOverflow.
Good luck!
Upvotes: 1