简体   繁体   中英

iOS Present Full Screen view on UIModalTransitionStylePartialCurl View Controller

Developing for an iPhone, I have a main view controller that presents a second "Share" view controller using a transition of UIModalTransitionStylePartialCurl. These seems to make sense from a UI perspective as it can just take up a little bit of space showing a few share buttons at the bottom while keeping the user on the main view. At this point, if I have a button launch a third view (MFMailComposeViewController in this case) the mailer view will present itself underneath the curl of the previous view, making it unusable.

I would like for the third Mail view to break out and present itself entirely, is this not possible?

Feel free to shoot me down if I'm messing up Apple UI standards or something here.

Try presenting the mail vc from the presentingViewController after dismissing the vc under the curl. That approach would look like this:

In the FirstVC (the one that triggers the curl transition):

FirstVC.h

- (void)presentMail;

FirstVC.m

- (void)presentMail {
    // the code to present the mail UI, moved here from the SecondVC under the curl
}

SecondVC.m

- (IBAction)userPressedTheMailButton:(id)sender {

    [self dismissViewControllerAnimated:YES completion:^{
        [self.presentingViewController presentMail];
    }];
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM