KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
How can we force UIImagePickerController controller to record video only in landscape mode? I know that this class should be used for portrait recording, but I need to have it in landscape. Have found several similar questions but there is not any solution which works for me (iOS 6.1). For example observation of device orientation doesn't work for me (this answer- https://stackoverflow.com/a/2147584/775779 ) If I implement UIImagePickerController category like the following: #import "UIImagePickerController+NonRotating.h" @implementation UIImagePickerController (NonRotating) - (BOOL)shouldAutorotate { return YES; } -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscape; } - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation { return UIInterfaceOrientationLandscapeRight; } @end it almost works, but I see some strange behavior of some controls and wrong video orientation during recording (the result video is ok). 1) Start. Cancel and recording button in the right positions, but other controls in wrong. And video is rotated. 2) Recording. Timer and video are wrong. 3) Recording finished. all good! and the result video is right. do you have any ideas? UPDATE I need to lock the screen in Landscape orientation during the recording process.
Tags (comma-separated)
Save Edits
Cancel