Swift UI Special training 26 Controls Overview

Source: Internet
Author: User

controls, like views, interact with the user and what is a control? The sliders, switches, and so on that we use are all controls. The base class for the control is Uicontrol. The contents of the control are as follows:


It is mainly selected, can be used and highlighted. We use a button to show:

Unchecked state:


Blue Word on the white background, now we tick selected:


When selected, it turns into a blue-bottomed white, flipped, which is also in line with our daily habits.

If highlighting is selected, the color will be lighter gray:


Space supports a variety of interactive events, such as gestures, touch, drag, and so on. are in the class uicontrolevents. A control's target-action mechanism, in which a control sends a message to another object after an event related to it occurs.



Is the manipulation of the appearance of the control, primarily horizontal and vertical alignment.

The constraints and views of the control are almost as well as the constraints of the distance.

The control also has important accessibility features:


Traits: Concise description of State/behavior/usage combinations.

Hint: A brief indication of the result of an action.

Frame: The screen coordinate frame of an element.

Value: The current value of an element

Swift UI Special training 26 Controls Overview

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.