我正在实现一个关于相机模式功能的应用程序,但应用程序仅运行横向但相机在 iPad 的某些部分打开,仅剩余部分为黑色。
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
camPicker.sourceType = UIImagePickerControllerSourceTypeCamera;
camPicker.delegate = self;
camPicker.allowsEditing = NO;
[self presentModalViewController:camPicker animated:YES];
对于固定为的方向
if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) {
return interfaceOrientation == UIInterfaceOrientationLandscapeLeft;
}else
{
return interfaceOrientation == UIInterfaceOrientationLandscapeRight;
}