Three ways iOS develops jump scenes

Source: Internet
Author: User

Three ways iOS develops jump scenes October 17, 2012, 15:32

Suppose a jumps to B, three ways:
1. Hold down the CTRL key, drag the control on a (for example, UIButton) to B, pop-up menu, select Modal. No need to write any code, click on a button on a to jump to B
2. Hold down the CTRL key, drag the view controller on a to B, pop-up menu, select modal, add connection lines and icons automatically between two scenes, select the icon, open storyboard Segue,identifier Enter an identifier, AAAA "for example. When a is required to jump, execute the following code:

1
[Self performseguewithidentifier:@ "AAAA" sender:self];

3. Fully implemented in code, with the following code:

123456789
    Get Uistoryboard object First, parameter is filename    uistoryboard *mainstoryboard=[uistoryboard storyboardwithname:@ "Mainstoryboard" Bundle:nil];    Get Secondviewcontroller instance, parameter is storyboard ID, check view Controller, Secondviewcontroller in Identity Inspector    * Second=[mainstoryboard instantiateviewcontrollerwithidentifier:@ "Second"];    Set the style of the transition, and display the style    second.modaltransitionstyle=uimodaltransitionstylefliphorizontal;    Second.modalpresentationstyle=uimodalpresentationformsheet;    Show    [self Presentviewcontroller:second animated:yes completion:nil];

Three ways iOS develops jump scenes

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.