当前位置:网站首页>SwiftUI 4 新功能 之 网格视图Gridview组件 (教程含源码)
SwiftUI 4 新功能 之 网格视图Gridview组件 (教程含源码)
2022-06-25 21:32:00 【知识大胖】
SwiftUI 4 引入了一个名为Gridview 的新容器视图。AGrid是一个容器视图,它通过将其子视图排列成行和列来为我们提供二维布局。
Grid我们通过使用集合初始化来创建布局GridRows。让我们创建一个示例以更好地理解:
struct ContentView: View {
var body: some View {
VStack {
Grid {
GridRow {
Label("OpenSwiftUI", systemImage: "heart")
Label("iOS Development", systemImage: "graduationcap")
}
}
.font(.title3)
}
.padding()
}
}
我们可以像这样添加更多的网格行:
struct ContentView: View {
var body: some View {
VStack {
Grid {
GridRow {
Label("OpenSwiftUI", systemImage: "heart")
Label("iOS Development", systemImage: "graduationcap")
}
GridRow {
Label("SwiftUI" , systemI边栏推荐
- On ACM competition
- What is a server? (Powercert animated videos)
- js (1)
- What is ARP (address resolution protocol)? (Powercert animated videos)
- [nailing scenario capability package] enterprise and public institution intelligent access control
- Modprobe: fatal: module kvmgt not found, kvmgt has no module, kvmgt has no driver, gvt-g precautions, gvt-g precautions for starting win10 in UEFI mode
- Differences between modems and routers (powercert animated videos)
- Server pressure troubleshooting top
- On merging and sorting
- Alicloud disk mounted locally
猜你喜欢

Jmeter- (III) create user test cases for interface testing
![[nailing - scenario capability package] nailer card](/img/ec/c2f342a54ab69d8b834a8a1c8f8a01.jpg)
[nailing - scenario capability package] nailer card
![[nailing scenario capability package] enterprise and public institution intelligent access control](/img/0e/43433ca5586c48d01708e5fa39a808.jpg)
[nailing scenario capability package] enterprise and public institution intelligent access control
![[nailing scenario capability package] smart office phone](/img/ec/c2f342a54ab69d8b834a8a1c8f8a01.jpg)
[nailing scenario capability package] smart office phone

Molecular dynamics - basic characteristics of molecular force field

QT method of exiting application (exe)

Explain memcached principle in detail
![[nailing scenario capability package] exhibition admission](/img/a1/5900ad0d3c89f21da3a2d96c91943a.jpg)
[nailing scenario capability package] exhibition admission
![[summary] 2021unctf Campus (cry & MISC)](/img/b1/8c4fb9c6d4f1b89361c0487762cdbd.jpg)
[summary] 2021unctf Campus (cry & MISC)

What is a subnet mask? (Powercert animated videos)
随机推荐
Common optimization of e-commerce server system architecture
Installing and configuring redis under Linux
What is a server? (Powercert animated videos)
银河证券靠谱吗?开证券账户安全吗?
Canoe learning notes (2)
CANoe. Diva operation guide - establishment of operation environment
PHP Chinese word segmentation API, Harbin Institute of technology ltpcloud, naturallanguageprocessing, free, best practices!
股市小白通过网上进行股票开户安全吗?
[summary] 2021unctf Campus (cry & MISC)
Summary of several methods for FPS calculation
[nailing - scenario capability package] nailer card
On ACM competition
Get the root directory of the package at compile time from buildreoot
Rounding related calculation
What is API
同花顺炒股软件开户是合法的吗?安全吗
Jmeter- (I) installation of interface test
Mutual conversion of CString and char*
Please enter an integer and output it as several digits, and output each digit in reverse order.
Code program related problems troubleshooting directory