Build accessible apps with SwiftUI and UIKit

RSS for tag

Discuss the WWDC23 Session Build accessible apps with SwiftUI and UIKit

Posts under wwdc2023-10036 tag

1 result found
Sort by:

Post

Replies

Boosts

Views

Activity

Help with "Trailing closure passed to parameter of type 'FormStyleConfiguration' that does not accept a closure."
Hello, Apologies if I don't follow protocol. This is my first time asking a question. I'm enjoying discovering Swift. I'm getting tan error after Form { and wonder if you might know how to resolve it. After Form { I receive the following error: "Trailing closure passed to parameter of type 'FormStyleConfiguration' that does not accept a closure." What am I doing wrong? Below is the entire RegisterView file. Thank you in advance for any assistance. How will I receive your response? I've not entered my email address anywhere? Here at 17:39 shows what it should look like: https://www.youtube.com/watch?v=pAB1tMH6TFc Lorna import SwiftUI struct RegisterView: View { @StateObject var viewModel = RegisterView_ViewModel() var body: some View { VStack { //Header HeaderView(title: "Register", subtitle: "Start organizing", angle: -15, background: .blue) Form { TextField("Full Name", text: $viewModel.name) .textFieldStyle(DefaultTextFieldStyle()) .autocorrectionDisabled() TextField("Email Address", text: $viewModel.email) .textFieldStyle(DefaultTextFieldStyle()) .autocapitalization(.none) .autocorrectionDisabled() SecureField("Password", text: $viewModel.password) .textFieldStyle(DefaultTextFieldStyle()) TLButton( title: "Create Account", background: .green ) { viewModel.register() } .padding() } .offset(y: -50) Spacer() } } } struct RegisterView_Previews: PreviewProvider { static var previews: some View { RegisterView() } } Thank you in advance for your help. Lorna
9
0
1.4k
Sep ’23