I am using UIModalPresentationFormSheet and opening UIImagePickerController (or any UIViewController) but size of UIModalPresentationFormSheet changes when dismissing the UIImagePickerController or any other controller
modalViewController *changeProfilePicture = [[ModalViewController alloc] init];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:modalViewController];
navigationController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
navigationController.modalPresentationStyle = UIModalPresentationFormSheet;
[mainViewController presentModalViewController:navigationController animated:YES];
navigationController.view.superview.frame = CGRectMake((CGRectGetWidth(mainViewController.view.bounds)-300)/2, (CGRectGetHeight(mainViewController.view.bounds)-300)/2, 300, 300);
In modalViewController I am opening UIImagePickerController for pick a image in FullScreen mode. then frame size of modalViewController become almost twice.
It was ok when open the UIImagePickerController in popoverview.
But here my requirement is like I also have to open some other viewController in FullScreen mode.
Any Idea how we maintain the modalViewController frame size as it is.