SwiftUI基础的简要说明 md 语法 斜体AbD英文有效 加粗AbD 斜体加粗AbD
引用
引用
分割线
- 无序列表1
- 无序列表2
- 有序列表1
- 有序列表2
表头 | biaotou | ---|:--:|---
代码
以下是一个入门指南,其中包含UIKit类名和SwiftUI名称:
UITableView: List UICollectionView: No SwiftUI equivalent UILabel: Text UITextField: TextField UITextField with isSecureTextEntry set to true: SecureField UITextView: No SwiftUI equivalent UISwitch: Toggle UISlider: Slider UIButton: Button UINavigationController: NavigationView UIAlertController with style .alert: Alert UIAlertController with style .actionSheet: ActionSheet UIStackView with horizontal axis: HStack UIStackView with vertical axis: VStack UIImageView: Image UISegmentedControl: SegmentedControl UIStepper: Stepper UIDatePicker: DatePicker
NSAttributedString:与SwiftUI不兼容;改用Text。 SwiftUI还具有许多其他独有的组件,例如使我们能够按深度而不是水平或垂直构建事物的堆栈视图。
通过真实的应用程序项目学习SwiftUI