Hui WangNov 18, 20222 min readSwiftUI78. 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 WangSep 12, 20222 min readSwiftUI59. SwiftUI: Introducing CapsuleToday I will show you how to use Capsule. I will use multiple Capsules to draw a colored petal. Steps: First, add a Capsule. Its default...
Hui WangJun 6, 20222 min readSwiftUI36. SwiftUI: Hide UIActivityIndicatorView through AnyCancellableToday I will show you how to use AnyCancellable to hide UIActivityIndicatorView. Steps: Continue the source code of the previous blog...
Hui WangApr 3, 20221 min readSwiftUI23. SwiftUI: Introduce TextEditor you can enter multi-line textYouTube: Source Code: import SwiftUI struct ContentView: View { @State var content = "" @State var isAlert = false init() {...
Hui WangMar 30, 20221 min readSwiftUI21. SwiftUI: How to download and display network images using image viewYouTube: Source Code: import SwiftUI struct ContentView: View { @State private var remoteImage: UIImage? = nil let placeholderImage =...
Hui WangJan 26, 20222 min readSwiftUI13. SwiftUI: Open a modal window via ButtonToday I will introduce how to use the sheet method of the Button control to open a modal window with specified content. Knowledge points:...
Hui WangJan 23, 20222 min read10. SwiftUI: Use SecureField ciphertext input box to receive the user's passwordWhen the user is entering the password, we need to use the ciphertext to display the content entered by the user, which requires the use...
Hui WangJan 22, 20223 min readSwiftUI9. SwiftUI: Use TextField text input box to receive data from usersToday I will show you how to use TextField. TextField is a control that displays an editable text interface, mainly for receiving and...