0

由于某种原因,我的相机控件未对齐,并且在屏幕顶部显示被截断。下面是我为使用相机而实现的代码,有什么可以解决这个问题的吗?

- (void)takePhoto {
     UIImagePickerController *picker = [[UIImagePickerController alloc] init];
    if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) {
        picker.sourceType = UIImagePickerControllerSourceTypeCamera;
        picker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;
    } else {
        picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
    }
    [MAINVIEWCONTROLLER presentViewController:picker animated:YES completion:nil];

}

在此处输入图像描述

4

1 回答 1

1

检查wantFullScreenLayout并进行相应设置。

如果你想要全屏,你还需要使用setStatusBarHidden:withAnimation 隐藏状态栏:

于 2013-07-29T19:51:00.640 回答