denvdancsk
denvdancsk

Reputation: 3053

iOS7 present childViewController similar to MFMailComposeViewController for iPad

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];

Upvotes: 1

Views: 616

Answers (1)

Léo Natan
Léo Natan

Reputation: 57060

Try:

AskQuestionViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"AskQuestionViewController"];
vc.modalPresentationStyle = UIModalPresentationPageSheet;
[self.splitViewController presentViewController:vc animated:YES completion:nil];

Upvotes: 4

Related Questions