Post

Replies

Boosts

Views

Activity

How to solve "Extra trailing closure passed in call" in a section?
Hey there, I'm new to Swift and currently building my first app. I'm having the error "Extra trailing closure passed in call" in a section and already compared it to working sections and just can't find the error in my code. Maybe you guys can help me: Form { Section("Essential Information") { TextField("Title", text: $title) TextField("Composer", text: $composer) TextField("Opus", text: $opus) } The error is occurring in the section line. There are over sections that work perfectly fine: Section("Additional Details") { TextField("Epoch", text: $epoch) TextField("Type", text: $type) TextField("Accompaniment", text: $accompaniment) TextField("Length (minutes)", value: $length, format: .number) .keyboardType(.numberPad) TextField("Key", text: $key) TextField("Difficulty", text: $difficulty) TextField("Tempo (BPM)", value: $tempo, format: .number) .keyboardType(.numberPad) }
Topic: UI Frameworks SubTopic: SwiftUI
2
0
342
Feb ’25