#Preview {
SwiftUIView()
}
Error:Missing argument for parameter 'isShowing' in call
Whay? can you help me?
#Preview {
SwiftUIView()
}
Error:Missing argument for parameter 'isShowing' in call
Whay? can you help me?
Welcome to the forum.
You probably have a var or State var in SwiftUIView, probably a Bool ?
var isShowing: Bool
or
@State var isShowing: Bool
If so, you have 2 options
var isShowing: Bool = true
or
@State var isShowing = true
Or pass the parameter in Preview call
SwiftUIView(isShowing : true)
Do not forget to close the thread if that works by marking the correct answer. Otherwise, explain and show more code.
Just make isShowing
private if it has no external purpose.
Hi,
Sorry to hear you are having problems getting previews working. The above suggestions will likely resolve your issue. If not, the best next step will be to file a feedback with diagnostics so we can take a look.
Steps to generate helpful diagnostics:
previews-diagnostics-0123456789.zip
)