"We all love Paul Hegarty" Stanford IOS8 public class personal note Modal Segue (modal transition)

Source: Internet
Author: User

The

Modal segue will occupy the entire screen, so use must be careful to do the processing of the return in advance, the advantage of using modal segue is that it must be before performing an operation, such as the alert and actionsheet we are familiar with.
For example, the contact page in the phone, click the plus sign in the upper right corner will appear a page to add a contact, the whole page is modalsegue. Usually the Cancel button in the Modalsegue cancels the current operation, and the OK button submits the current action. Note that MVC generated by modal segue can also be nested, such as adding a contact Avatar button on the contact page is also a modal segue mvc.
In short use modal segue to be careful, as to how to use the modal segue problem, in connection with the choice of modal, if not through the button call segue, you can call the Performsegue method directly in the code, or Presentviewcontroller method. The
Modal in method Prepareforsegue is not different from other methods. So how do you get back from the MVC created by modal segue? Typically, the whole MVC interacts with some data without returning any information, such as adding a new contact, and if you need to, you can interact with unwind segue, but most modal MVC will only dismiss (remove) themselves. So how to remove it? If you use unwind, the current controller is automatically removed when you return to the specified controller. If you do not apply unwind, you need to call dismiss, call the following method:
dismissviewcontrolleranimated, and then return to the previous MVC (that is, MVC using modal segue to generate MVC). Dismiss only for the MVC currently displayed to the user, at any time by modal Segue Mvc knows who pops up.
About modal Segue animations: We see that MVC using modal segue is slipping out of the way, which is the default. Coververtical, there are other ways, such as
. FlipHorizontal: Flips The effect, pops up the MVC with the previous MVC by flipping the swap position.
. Crossdissolve: New MVC fades in, old MVC fades out.
. Partialcurl: A new MVC is shown by flipping a corner from underneath.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

"We all love Paul Hegarty" Stanford IOS8 public class personal note Modal Segue (modal transition)

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.