Skip to content

Commit 3a35a44

Browse files
author
Chasel Li
committed
update readme
1 parent acf26ff commit 3a35a44

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ When learning and using `SwiftUI`, if you have any questions, you can join the S
7676
- [Group](#Group)
7777
- [GroupBox](#GroupBox)
7878
- [Section](#Section)
79+
- [Form](#Form)
7980

8081
* <span id="Architectural_D">Architectural Views</span>
8182
- [NavigationView](#NavigationView)
@@ -686,6 +687,24 @@ Section(header: Text("I'm header"), footer: Text("I'm footer")) {
686687
<img width="80%" src="images/example/Section.png"/>
687688
</details>
688689

690+
<h4 id="Form"> Form </h4>
691+
692+
`Form` A container for grouping controls used for data entry, such as in settings or inspectors.
693+
694+
Example:
695+
696+
```swift
697+
Form {
698+
TextField("First Name", text: $firstName)
699+
TextField("Last Name", text: $lastName)
700+
}
701+
```
702+
703+
<details close>
704+
<summary>View running results</summary>
705+
<img width="80%" src="images/example/Form.png"/>
706+
</details>
707+
689708
[🔝](#Layout_D)
690709

691710
<h4 id="NavigationView"> NavigationView </h4>

README_CN.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
- [Group](#Group)
8181
- [GroupBox](#GroupBox)
8282
- [Section](#Section)
83+
- [Form](#Form)
8384

8485
* <span id="Architectural_D">Architectural Views 导航、切换、排列</span>
8586
- [NavigationView](#NavigationView)
@@ -692,6 +693,24 @@ Section(header: Text("I'm header"), footer: Text("I'm footer")) {
692693
<img width="80%" src="images/example/Section.png"/>
693694
</details>
694695

696+
<h4 id="Form"> Form </h4>
697+
698+
`Form` 是对一组数据输入进行控制的容器
699+
700+
Example:
701+
702+
```swift
703+
Form {
704+
TextField("First Name", text: $firstName)
705+
TextField("Last Name", text: $lastName)
706+
}
707+
```
708+
709+
<details close>
710+
<summary>查看运行效果</summary>
711+
<img width="80%" src="images/example/Form.png"/>
712+
</details>
713+
695714
[🔝](#Layout_D)
696715

697716
<h4 id="NavigationView"> NavigationView </h4>

0 commit comments

Comments
 (0)