Storyboard several segue differences and view switching

Source: Internet
Author: User

Several segue:push, modal, PopOver, replace, Cutom.

One. View Switch Type Introduction

1. In the iphone and ipad, the type of segue is different.

2. In the iphone, Segue has (3): Push, modal, and custom three different types, these types differ in the way that new pages appear.

In the ipad, Segue has (5): Push, modal, popover, replace, custom type.

3.modal type (modal conversion):

A. The most commonly used scene, the new scene completely covers the old one. Users cannot interact with the previous scene unless they close the scene first.

B. It is the standard switching mode in Viewcontrollers, including fading out what, you can switch animations.

C. Modalview: It will pop up a view, you can only operate on the view, and cannot switch to the other view, unless you close the Modalview.

The modalview corresponding segue type is modal segue.

When user is done in the pop-up modalview, you should dismiss the modal view scene and switch back to the original.

4.Push Type:

A. Typically, the first interface is the navigation controller, which is the kind of navigation that is used at the lower level of the View controller to be drawn from the right.

B. This type is used in conjunction with navigation Viewcontrollers.

5.Popover Type:

The new page is displayed in the form of a floating window.

6.Replace Type:

Replace the scene of the current period.

7.Cutom Type:

Custom Jump mode.

************************

Two. Data transfer between segue

  

Three. Jump between Viewcontroller

1. If there is a segue between the current Viewcontroller in storyboard and the Viewcontroller to jump, You can execute Performseguewithidentifier:sender: This method implements the jump.

For example:[self performseguewithidentifier:@ ' go ' sender: self];

Where go defines the segue identifier for itself.

2. If the target Viewcontroller exists in storyboard, but there is no segue. You can go through Uistoryboard's Instantiateviewcontrollerwithidentifier: This method gets to it, and then you implement the jump in the way you want, such as: press stack.

3. If the target Viewcontroller does not exist, then create it.

Storyboard several segue differences and view switching

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.