top of page
Search

Hui Wang
Feb 13, 20231 min read
99. SwiftUI: Creating flexible grid layout using LazyVGrid
Code: import SwiftUI struct ContentView: View { private var items: [GridItem] = [ GridItem(.flexible(), spacing: 10),...

Hui Wang
Feb 7, 20231 min read
97. SwiftUI: How to switch the visibility of a Form?
Code: struct ContentView: View { @State private var isVisible = false @State private var username = "" @State private var password = "" ...

Hui Wang
Jan 26, 20231 min read
96. SwiftUI: How to activate/deactivate a Form
Here is an example of how you can activate and deactivate a Form in SwiftUI: struct ContentView: View { @State private var disabledForm =...

Hui Wang
Jan 25, 20231 min read
95. SwiftUI: Using section to divide the List into several groups
You can use the Section struct to divide a List view into multiple groups. The Section struct takes a single parameter, which is an array...

Hui Wang
Dec 16, 20221 min read
85. SwiftUI: How to delete and move elements of a List (NavigationView)
Today I will show you how to delete and move elements of a List. (demo with NavigationView). import SwiftUI struct ContentView: View { ...

Hui Wang
Dec 15, 20221 min read
84. SwiftUI: How to adjust the order of elements in the List (NavigationView)
Today I will show you how to adjust the order of elements in the List. (demo with NavigationView). import SwiftUI struct ContentView:...

Hui Wang
Dec 14, 20221 min read
83. SwiftUI: How to delete elements in a List (NavigationView)
Today I will show you how to delete elements in a List. (demo with NavigationView). import SwiftUI struct ContentView: View { /// 1....

Hui Wang
Nov 18, 20222 min read
78. SwiftUI: How to insert new items to a List (NavigationView)
Today I will show you how to insert new items into a List (demo with NavigationView). import SwiftUI struct ContentView: View { /// 1....

Hui Wang
Nov 17, 20221 min read
77. SwiftUI: Use List to show content vertically
The List in SwiftUI is like the UITableView in UIKit, which is used to show the contents of an array in the vertical direction. Make the...
bottom of page