I'm developing for iPad and I have the following problem:
I'm trying to show a modal with his own size and his own UINavigationController, I already done that, but when I present the modal with his UINavigationController, I get this:
I want the UINavigationController to fit to modal size. I leave the code of how I'm presenting the modal:
- (void)createANewEvent:(id)sender { AddEditEventViewController *addEditEventViewController = [[(ScheduleViewController *)self.viewContainer storyboard] instantiateViewControllerWithIdentifier:@"AddEditEventViewControllerID"]; addEditEventViewController.modalPresentationStyle = UIModalPresentationFormSheet; addEditEventViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:addEditEventViewController]; [self.viewContainer presentViewController:navigationController animated:YES completion:nil]; } How I resize the modal:
AddEditEventViewController.m // Resize the view - (void)viewWillLayoutSubviews { [super viewWillLayoutSubviews]; self.view.superview.bounds = CGRectMake(0, 0, 548, 768); self.view.superview.backgroundColor = [UIColor clearColor]; } Hope you can help me!
Thanks in advance! :)