문제

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];
도움이 되었습니까?

해결책

Try:

AskQuestionViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"AskQuestionViewController"];
vc.modalPresentationStyle = UIModalPresentationPageSheet;
[self.splitViewController presentViewController:vc animated:YES completion:nil];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top