top of page
Search
Hui Wang
Jun 18, 20231 min read
Hui's iOS Podcast: 2. WWDC 2023, SwiftUI Enhancements and SwiftData Unveiled i Apple Podcasts
Exciting news for all iOS enthusiasts out there! My latest episode of "Hui's iOS Podcast" is now live and ready to turbo-charge your iOS...
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...
Hui Wang
Nov 15, 20221 min read
75. Article: When does a SwiftUI Environment get retained?
Environment is one of SwiftUI's unique features that aren't available in UIKit. This article tells you how to manage the memory of the...
Hui Wang
Sep 29, 20221 min read
71. Article: viewDidLoad() in SwiftUI
If you come from the UIKit world, you might wonder what the viewDidLoad() equivalent method in SwiftUI is. Too bad there is no direct...
Hui Wang
Sep 20, 20221 min read
67. Article: How to know if ScrollView, List is scrolling
It is very important in some scenarios if you want to know if a scrollable control ( ScrollView, List ) is in a scrolling state. For...
Hui Wang
Sep 18, 20221 min read
66. SwiftUI: Introducing RadialGradient
Today I will show you how to use RadialGradient. The RadialGradient starts from the origin and spreads outward with an ellipse. The...
Hui Wang
Sep 18, 20221 min read
65. SwiftUI: Introducing AngularGradient
Today I will show you how to use AngularGradient. The start and end points of AngularGradient color gradients are clockwise. Steps:...
bottom of page