Swift UI Special Training 1 Interactive

Source: Internet
Author: User

We all know that when programming the iOS interface there are Iboutlet and Ibaction, the former refers to the latter is the operation, Ibaction has a parameter sender, used to point to the Operation object, before I published the forecast of the small program that can be seen, If we need a button click event then use Ibaction, if it is a label to show things, then use Iboutlet.

Now, let's talk about some of the event types in ibaction:

1.Touch down Inside: Touch, as long as we do not move, even if the event is triggered

2.Touch up Inside: Lift off, and 1 different is, after touch, raise your hands in the original position, trigger the event

3. Touch up Outside: Lift off (out of range), and 2 different is, after touching the finger left the range of the button and then raise the hand

4. Edit/change: Edit language, background, system settings, etc.

The second type of event is most commonly used.

Interaction can also be applied to navigation, which is the switch between multiple pages. Navitationcontroller I've applied a lot in this series of Swift iOS development wars, and I'm interested to see it. Now is the navigation of some features, navigation has a navigation stack, the characteristics of the stack is LIFO, so the layout of the page is the case, which is also in line with our usage habits.

In addition to navigating, we can also use the Segue (transition) in the storyboard to transition from one page to another, or it can be called traversal. The transition has three parts: display, reverse, modal eject.

Display: Refers to the second page from the first page, using push is append, and replace is replaced.

Modal: Is pop-up, such as our program needs to enter the account and password, if not input can only be closed.

Reverse: Back to the previous scene.

Swift UI Special Training 1 Interactive

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.