|
Hi I'm on Day 16 of 100 Days of SwiftUI and I'm following along in the video creating the code just as the Paul is showing but under "Form" in the Content I'm getting this error message "Trailing closure passed to parameter of type 'FormStyleConfiguration' that does not accept a closure" I attached a screen shot too. Can anyone assist? import SwiftUI struct ContentView: View { @State private var checkAmount = 0.0 @State private var numberOfPeople = 2 @State private var tipPercentage = 20
} Thanks! |
|
should be:
And you forgot an opening bracket |
|
|
|
Hello, I have the same issue. Here is my code. import SwiftUI struct ContentView: View { @State private var tasks = [Task]() @State private var showAddTask = false @State private var isSignedIn = false @State private var userID = ""
} struct TaskCell: View { var task: Task
} struct AddTaskView: View { @Binding var tasks: [Task] @State private var title = "" @State private var category = "" @State private var date = Date() @State private var reminder = false @State private var showDatePicker = false @State private var userID = ""
} struct Task: Identifiable { var id: String { return title } var title: String var category: String var date: Date var reminder: Bool var userID: String
} |
SPONSORED Get accurate app localizations in minutes using AI. Choose your languages & receive translations for 40+ markets!
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.