How to make menu in SwiftUI?
@State private var selectedView: LayoutOption = .list var body: some View { Menu(content: { ControlGroup { Button(action: { // Code }) { Image(systemName: "pin.fill")…
Youtuber @CodeWithWilliamJiamin's Website
Technical Blog Index
Start with a track, then drill into tags.
Core Topics
Popular Tags
• 1 min read
@State private var selectedView: LayoutOption = .list var body: some View { Menu(content: { ControlGroup { Button(action: { // Code }) { Image(systemName: "pin.fill")…
• 1 min read
In Swift and SwiftUI, the syntax . is known as a key path. A key path in Swift allows you to refer to properties…
• 1 min read
@FocusState private var isFocused: Bool @State private var text = "Tap, touch and hold, or swipe left to rename" var body: some View {…
• 1 min read
@State private var text: String = "" var body: some View { PasteButton(payloadType: String.self) { strings in text = strings[0] }.labelStyle(.titleOnly) }
• 1 min read
ShareLink(item: URL(string: "https://learn-it-free.com)!)
• 1 min read
// // ContentView.swift // Links // // Created by WilliamJiamin on 2024/6/20. // import SwiftUI struct ContentView: View { var body: some View {…
• 2 min read
// // ContentView.swift // Buttons // // Created by WilliamJiamin on 2024/6/20. // // //You can check more on Button at //https://developer.apple.com/documentation/swiftui/button import SwiftUI…
• 2 min read
// // ContentView.swift // Buttons // // Created by WilliamJiamin on 2024/6/20. // // //You can check more on Button at //https://developer.apple.com/documentation/swiftui/button import SwiftUI…
• 2 min read
This is a Default Button // // ContentView.swift // Buttons // // Created by WilliamJiamin on 2024/6/20. // import SwiftUI struct ContentView: View {…
• 1 min read
// // ColourGeneratorAppApp.swift // ColourGeneratorApp // // Created by WilliamJiamin on 2024/6/19. // import SwiftUI @main struct ColourGeneratorAppApp: App { var body: some Scene…
• 1 min read
// // ContentView.swift // Mini-SwiftUI-Project-Alert // // Created by WilliamJiamin on 2024/6/18. // import SwiftUI struct ContentView: View { @State private var isShowingAlert =…