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