UIImagePicker轮换问题

时间:2014-09-06 16:34:34

标签: iphone rotation uiimagepickercontroller landscape

我在我的应用中设置了一个UIIMagePicker:

    imagePickerController = [[UIImagePickerController alloc] init];
    imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
    imagePickerController.modalPresentationStyle = UIModalPresentationFullScreen;
    imagePickerController.showsCameraControls = NO;
    imagePickerController.navigationBarHidden = YES;
    imagePickerController.toolbarHidden = YES;
    imagePickerController.wantsFullScreenLayout = YES;
    //imagePickerController.cameraViewTransform =  CGAffineTransformScale(imagePickerController.cameraViewTransform, 1.0, 1.3);
    imagePickerController.delegate = self.overlayView;
    [self.view addSubview:imagePickerController.view];
    imagePickerController.cameraOverlayView =self.overlayView.view;

应用程序处于纵向模式时,一切都很好。然而,如果我在风景中旋转它会发生一个奇怪的问题:右侧出现黑条,视图是“旋转”的,因为如果我向上移动iPhone,图像会向侧面移动而反之亦然。

如果我以横向模式开始,则不会出现黑条(当我在底部旋转到纵向模式时反过来显示),但有趣的旋转行为也是如此。 在这两种情况下,覆盖屏幕似乎都会填满屏幕并正确处理旋转。

可能是什么问题以及如何解决?

谢谢,Fabrizio

0 个答案:

没有答案