Skip to content

Commit

Permalink
IOS-8946 Disable some tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
tureck1y committed Jan 27, 2025
1 parent c90af73 commit 025b462
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions TangemSdk/TangemSdk/UI/Views/Common/FocusableTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ struct FocusableTextField: View {
SecureField("", text: text, onCommit: onCommit)
.focused($focusedField, equals: .secure)
.keyboardType(.default)
.writingToolsBehaviorDisabled()
.autocorrectionDisabled()
.textInputAutocapitalization(.never)
.onAppear(perform: model.onAppear)
.onReceive(model.focusPublisher) { _ in
if shouldBecomeFirstResponder {
Expand Down Expand Up @@ -102,3 +105,14 @@ fileprivate extension UIApplication {
applicationState == .active
}
}

fileprivate extension View {
@ViewBuilder
func writingToolsBehaviorDisabled() -> some View {
if #available(iOS 18.0, *) {
self.writingToolsBehavior(.disabled)

Check failure on line 113 in TangemSdk/TangemSdk/UI/Views/Common/FocusableTextField.swift

View workflow job for this annotation

GitHub Actions / Test

value of type 'Self' has no member 'writingToolsBehavior'

Check failure on line 113 in TangemSdk/TangemSdk/UI/Views/Common/FocusableTextField.swift

View workflow job for this annotation

GitHub Actions / Test

cannot infer contextual base in reference to member 'disabled'

Check failure on line 113 in TangemSdk/TangemSdk/UI/Views/Common/FocusableTextField.swift

View workflow job for this annotation

GitHub Actions / Test

value of type 'Self' has no member 'writingToolsBehavior'

Check failure on line 113 in TangemSdk/TangemSdk/UI/Views/Common/FocusableTextField.swift

View workflow job for this annotation

GitHub Actions / Test

cannot infer contextual base in reference to member 'disabled'
} else {
self
}
}
}

0 comments on commit 025b462

Please sign in to comment.