初衷

2019-10-23  本文已影响0人  水之飞亦

主要介绍下面几个方面的东西

View 协议

protocol View
A type that represents a SwiftUI view.
Creating and Combining Views
This tutorial guides you through building Landmarks — an iOS app for discovering and sharing the places you love. You’ll start by building the view that shows a landmark’s details.
Working with UI Controls
In the Landmarks app, users can create a profile to express their personality. To give users the ability to change their profile, you’ll add an edit mode and design the preferences screen.

Text 内容视图

struct Text
A view that displays one or more lines of read-only text.
struct TextField
A control that displays an editable text interface.
struct SecureField
A control into which the user securely enters private text.
struct Font
An environment-dependent font.

Images 图片视图

struct Image
A view that displays an environment-dependent image.

Buttons 按钮

struct Button
A control that performs an action when triggered.
struct NavigationLink
A button that triggers a navigation presentation when pressed.
struct MenuButton
A button that displays a menu containing a list of choices when pressed.
struct EditButton
A button that toggles the edit mode for the current edit scope.
struct PasteButton
A system button that triggers reading data from the pasteboard.

Value Selectors 选择器

struct Toggle
A control that toggles between on and off states.
struct Picker
A control for selecting from a set of mutually exclusive values.
struct DatePicker
A control for selecting an absolute date.
struct Slider
A control for selecting a value from a bounded linear range of values.
struct Stepper
A control used to perform semantic increment and decrement actions.

上一篇 下一篇

猜你喜欢

热点阅读