Input content type - SwiftUI

In SwiftUI, you can set a content type by using the textContentType view modifier.

The following values are defined in UITextContentType:

Example of using textContentType:

@State var emailAddress: String = ""

var body: some View {
    TextField("Email", text: $emailAddress)
        .textContentType(.emailAddress)
}