I use the camera on iPad 2 – my app is Landscape, but I want to use the camera in portrait mode. I can’t seem to force ImagePicker a to enter Portrait mode, and b, stop auto-rotating.
Is there any way to force ImagePicker to portrait (or landscape), And/or prevent it from rotating automatically?
Even if the app is in landscape and set to return YES only to landscape, ImagePicker will ignore it and rotate to portrait when rotating iPad 2.
If I can force it Staying in the landscape (though not ideal) I can redesign the app to use the camera in the landscape, but I can’t seem to do that!
Any help is greatly appreciated!
_isSupportedInterfaceOrientation:< /p>
So it should look like this:
@interface PortraitImagePickerController: UIImagePickerController {
}
@end
@implementation PortraitImagePickerController
- (BOOL)_isSupportedInterfaceOrientation:(UIDeviceOrientation)orientation{
return UIDeviceOrientationIsPortrait(orientation);
}
@end
But it is definitely a private method, so Apple may reject your app
I have been trying to troubleshoot this problem for a while, and then I have nowhere to go.
I use the camera on iPad 2-my app is in landscape, but I want to be in portrait Use the camera in mode. I can’t seem to force ImagePicker a to enter Portrait mode, but b, stop auto-rotating.
Is there any way to force ImagePicker to portrait (or landscape), and/or prevent it from auto-rotating?
Even if the app is in landscape and set to return YES only to landscape, ImagePicker will ignore it and rotate to portrait when rotating iPad 2.
If I can force it Staying in the landscape (though not ideal) I can redesign the app to use the camera in the landscape, but I can’t seem to do that!
Any help is greatly appreciated!
The method call you need to override:
_isSupportedInterfaceOrientation:
So it looks like this Of:
@interface PortraitImagePickerController: UIImagePickerController {
}
@end
< br />
@implementation PortraitImagePickerController
- (BOOL)_isSupportedInterfaceOrientation:(UIDeviceOrientation)orientation{
return UIDeviceOrientationIsPortrait(orientation);
)
@end
But it is definitely a private method, so Apple may reject your app