UIImagePickerController iphone5 Orientation Landscapemode

时间:2012-12-18 13:44:03

标签: ios ios6 uiimagepickercontroller iphone-5

我将UIImagePickerController分类并将其实施为@implementation

- (BOOL)shouldAutorotate

它的工作正常,但问题是:

在横向模式下拍摄时,显示屏以纵向模式显示,拍摄后,拍摄的图像正确显示(横向模式)

为什么显示方向会发生变化

我的代码列在这里:

@interface NonRotateUIImagePickerViewController:UIImagePickerController

- (BOOL)shouldAutorotate;

@end

@implementation NonRotateUIImagePickerViewController

- (BOOL)shouldAutorotate {
    return NO;
}


@end

之前:

https://skydrive.live.com/?cid=eb7f2f7c40e359ee#cid=EB7F2F7C40E359EE&id=EB7F2F7C40E359EE!493

后: https://skydrive.live.com/?cid=eb7f2f7c40e359ee#cid=EB7F2F7C40E359EE&id=EB7F2F7C40E359EE!492

1 个答案:

答案 0 :(得分:0)

您应该考虑视图父级的自动旋转属性。

这是因为如果将它们设置为自动旋转,则所有子项也将旋转。