Post

Replies

Boosts

Views

Activity

Reply to Build a List with keyboard selection (macOS App)
struct Home: View {          @EnvironmentObject var modelData: ModelData     var body: some View {         List{             ForEach(0..modelData.reminder_list.count) { i in                 TextField(                     "New",                     text: $modelData.reminder_list[i].content                 )                 .textFieldStyle(PlainTextFieldStyle())                 .font(.system(size: 16, weight: .semibold))             }           }     } } Just like this, then the textfield is terrible. It seems that I can upload images. It's a macOS App, you have to click the text, and wait a second, only after that you can edit the text. About what what I want you can refer to the macOS Reminder.app More importantly, I want the selection works with keyboard.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21