iPad 2 UIImagePickerController camera automatic rotation makes me go crazy!

I have been trying to troubleshoot this problem for a while, and then there is nowhere to go.

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!

The method call you need to cover:

_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

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 295 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.