在我的 iPad 应用程序中,我创建了一个模态视图并调整其大小,如下所示:
ModalViewController *modalController = [[WishlistInfoViewController alloc] initWithNibName:@"WishlistInfoViewController" bundle:nil];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:modalController];
navController.modalPresentationStyle = UIModalPresentationPageSheet;
self presentViewController:navController animated:YES completion:nil];
navController.view.superview.bounds = CGRectMake(0, 0, 700, 700);
navController.view.superview.center = CGPointMake(self.view.center.x, self.view.center.y + 35);
在该模态视图中,我像这样启动相机:
UIImagePickerController *mypicker = [[UIImagePickerController alloc] init];
mypicker.delegate = self;
mypicker.allowsEditing = NO;
mypicker.sourceType = UIImagePickerControllerSourceTypeCamera;
mypicker.showsCameraControls = YES;
mypicker.wantsFullScreenLayout = YES;
[self.navigationController presentModalViewController:mypicker animated:YES];
我像这样关闭相机:
[self dismissModalViewControllerAnimated:TRUE];
问题是当我关闭相机时,模态视图会调整大小以填满整个屏幕。我能做些什么来防止模态视图调整大小?