Differences between several sews in Storyboard and switching between views

Source: Internet
Author: User

Differences between several sews in Storyboard and switching between views

Several sews: push, modal, popover, replace, and cutom.

I. View switching type

1. In iPhone and iPad, the segue type is different.

2. There are three types of segue in the iPhone: push, modal, and custom. The difference between these types lies in the way new pages appear.

There are five types of segue in iPad: push, modal, popover, replace, and m.

3. modal type (modal conversion ):

A. The most common scenario is that the new scenario completely covers the old one. Users cannot interact with the previous scenario unless they disable it first.

B. It is the standard switching mode in viewControllers, including fading out or something. You can switch the animation.

C. ModalView: A view is displayed. You can only operate on the view, but not switch to another view, unless you disable modalView.

The segue type corresponding to ModalView is modal segue.

After the user completes the operation in the pop-up modalView, the user should dismiss the modal view scene and switch to the original view.

4. Push type:

A. Generally, the first interface is the Navigation Controller, which is the way to draw from the right when the lower level of the navigation View Controller is used.

B. This type is used with navigation viewcontrollers.

5. Popover type:

The new page is displayed in a floating window.

6. Replace type:

Replace the current scene.

7. Cutom type:

Custom jump mode.

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

II. Data transmission between segue

  

3. Jump between viewcontrollers

1. If there is a gap between the current ViewController and the ViewController to be redirected in the storyboard, You can execute javasmseguewithidentifier: sender: To achieve the redirection.

For example: [self authentication mseguewithidentifier: @ "go" sender: self];

Where, go is the custom segue identifier.

2. If the target ViewController exists in the Storyboard, but there is no segue. You can use the instantiateViewControllerWithIdentifier method of the UIStoryboard to get it, and then you can use the desired method to achieve the jump, such as: Stack pressure.

3. If the target ViewController does not exist, create it.

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.