Question

One of the view controllers in my iPad app is a questionnaire form. I'm trying to present it so that it appears in a childViewController modal segue just like the default segue for MFMailComposeViewController.

This is the look I am trying to achieve:

enter image description here

The code I am using doesn't seem to be working:

AskQuestionViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"AskQuestionViewController"];
[self addChildViewController:vc];
vc.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self.splitViewController presentViewController:vc animated:YES completion:nil];
Was it helpful?

Solution

Try:

AskQuestionViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"AskQuestionViewController"];
vc.modalPresentationStyle = UIModalPresentationPageSheet;
[self.splitViewController presentViewController:vc animated:YES completion:nil];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top