-
macOS 14.5、Xcode 15.4、iPhone OS 18.0 beta
-
Open Xcode and create a new project. Select swiftUI for Interface, Swift for Language, and Swiftdata for Storage.
- After creating the project, open the ContentView.swift file,write the code
@State var username: String = ""
TextField("info", text: $username)
.textFieldStyle(.roundedBorder)
.disableAutocorrection(true)
.textInputAutocapitalization(.never)
- Run the project on iPhone. textField gets focus, freezes, and takes 7000 milliseconds to focus