我正在使用以下代码在 iPad 的弹出视图控制器中打开相机。一切正常,除了它总是以横向模式打开。我想以横向模式打开流行相机。父视图锁定为横向模式。
请让我知道是否可以将相机帧大小更改为纵向模式。
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; imagePicker.cameraDevice = UIImagePickerControllerCameraDeviceFront; imagePicker.delegate = self; UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:imagePicker]; self.popOverController = popover; popover.popoverContentSize = CGSizeMake(350, 500); popover.delegate = self; [self.popOverController presentPopoverFromRect:CGRectMake(100, 100, 350,500) inView:self permittedArrowDirections:UIPopoverArrowDirectionLeft animated:YES];