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