I'm trying to disable Writing Tools for a specific TextField using .writingToolsBehavior(.disabled)
, but when running the app on my iPhone 16 Pro with Apple Intelligence enabled, I can still use Writing Tools on the text box. I also see no difference with .writingToolsBehavior(.limited)
.
Is there something I'm doing wrong or is this a bug?
Sample code below:
import SwiftUI
struct ContentView: View {
@State var text = ""
var body: some View {
VStack {
TextField("Enter Text", text: $text)
.writingToolsBehavior(.disabled)
}
.padding()
}
}
#Preview {
ContentView()
}
Hello @rmahmud28. Sorry you're having trouble with the new API. It's a known issue that TextField
and Text
currently don't adapt to the writingToolsBehavior(_:)
view modifier as documented. It does affect TextEditor
, however.