0
votes

The last segue in one branch of the "master" side of my splitViewController is a modal (fullscreen) segue from a tableViewCell in the master to a tableViewController.

When the device is landscape everything works fine, the new tableViewController is presented in fullscreen as expected.

When the device is portrait, however, and the masterVC is displayed using the popover button, selecting the tableViewCell causes the modal segue to present the new TableVC inside the popover rather than in fullscreen.

After dismissing the Modal VC (from within the master popover) the layout of the popover is "off" i.e. the table is not autoresized properly for the popover.

Can anyone tell me why? or point me in the right direction to solving this...

Thanks.

1

1 Answers

0
votes

By default the UIViewController being presented inherits the presentation context of the presenter. You can change this by modifying the modalPresentationStyle and optionally the modalTransitionStyle of the UIViewController you want to present modally.

UIViewController* myModalVC =  [UIViewController alloc] init]; 
myModalVC .modalPresentationStyle = UIModalPresentationFullScreen;
//myModalVC .modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;     
[self presentViewController:rViewController animated:YES completion:nil];