|
When I try to run my code I get the following error: Trailing closure passed to parameter of type 'FormStyleConfiguration' that does not accept a closure. I am certain its from the picker I am using in the code. How do I fix this? Here is the code:
Here is the line of code giving me problems:
|
|
I tried changing the picker to this but it still does not work:
|
|
So when I add a pickerstyle to the code it compiles but it still gives me the following warning: 1. 'init(_:)' declared here (SwiftUI.Form) Also my code starts with 2 cups of coffee instead of just one. Not sure why its doing this.
|
|
When I change ForEach to (0..<21) I start at 1 cup but when I use ForEach(1..<21) it starts at 2. |
|
Hi, so as you probably noticed you cannot apply font modifier to the picker like so:
but only after a closure it takes:
To solve the second issue the easiest way is to create array of numbers after your @State properties like that:
and use it in your picker similar to this.
|
|
What about this error? What do I do about it?
The error happens after my first form after navigation view. |
|
Here is the code of the solution of your problem {
|
SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.
Sponsor Hacking with Swift and reach the world's largest Swift community!
You need to create an account or log in to reply.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.