Skip to content

Commit 025b462

Browse files
committed
IOS-8946 Disable some tooling
1 parent c90af73 commit 025b462

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

TangemSdk/TangemSdk/UI/Views/Common/FocusableTextField.swift

+14
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ struct FocusableTextField: View {
2222
SecureField("", text: text, onCommit: onCommit)
2323
.focused($focusedField, equals: .secure)
2424
.keyboardType(.default)
25+
.writingToolsBehaviorDisabled()
26+
.autocorrectionDisabled()
27+
.textInputAutocapitalization(.never)
2528
.onAppear(perform: model.onAppear)
2629
.onReceive(model.focusPublisher) { _ in
2730
if shouldBecomeFirstResponder {
@@ -102,3 +105,14 @@ fileprivate extension UIApplication {
102105
applicationState == .active
103106
}
104107
}
108+
109+
fileprivate extension View {
110+
@ViewBuilder
111+
func writingToolsBehaviorDisabled() -> some View {
112+
if #available(iOS 18.0, *) {
113+
self.writingToolsBehavior(.disabled)
114+
} else {
115+
self
116+
}
117+
}
118+
}

0 commit comments

Comments
 (0)