Questions tagged [uitextinputtraits]

The UITextInputTraits protocol defines features that are associated with keyboard input. All objects that support keyboard input must adopt this protocol in order to interact properly with the text input management system. The UITextField and UITextView classes already support this protocol.

The UITextInputTraits protocol defines features that are associated with keyboard input. All objects that support keyboard input must adopt this protocol in order to interact properly with the text input management system. The UITextField and UITextView classes already support this protocol.

Click Here for Apple Documentation of UITextInputTraits

10 questions
11
votes
4 answers

SwiftUI: How to disable the "smart quotes" in TextEditor

I'm developing a Python-based graphic calculator for MacOS using SwiftUI. https://github.com/snakajima/macplot I am using SwiftUI's TextEditor as the editor for Python code, but I am not able to figure out how to disable the smart quote…
Satoshi Nakajima
  • 1,863
  • 18
  • 29
5
votes
1 answer

Adopting UITextInputTraits in Swift

I am trying to adopt the UITextInputTraits for a custom UIButton subclass in Swift 3. I added all the properties specified in the "Symbols" section of the documentation: import UIKit class TextInputButton: UIButton { var…
Nicolas Miari
  • 16,006
  • 8
  • 81
  • 189
5
votes
0 answers

iOS: How do QuickType keyboard suggestons work with the UITextInput protocol?

We have a text-entry view implemented using the UITextInput, UIKeyInput and UITextInputTraits protocols. Basic text entry and deletion work fine, via insertText: and deleteBackward. However, QuickType suggestions are not received by these methods,…
bright
  • 4,700
  • 1
  • 34
  • 59
5
votes
1 answer

Custom UITextInput implementation not showing multi-stage input suggestions

I have a custom UITextInput-based text editor. It works very well, except for multi-stage input via marked text. My marked region renders correctly, and marked text is inserted, but the candidate list above the keyboard is blank. For example, here…
simeon
  • 4,466
  • 2
  • 38
  • 42
3
votes
0 answers

Check user settings for Check Spelling and Autocorrect

I would like to make switch for turning on/off AutoCorrect and CheckSpelling function in UITextView. As far as I know when user disabled CheckSpelling in iOS (Settings > General > Keyboard > Check Spelling) there is no way to turn it on…
szooky
  • 177
  • 1
  • 12
3
votes
0 answers

iOS 7: UITextView UITextInputTraits bug?

Today while working on Reveal I became aware of a bug in iOS 7's UITextView's handling of the UITextInputTraits protocol. The UITextInputTraits protocol has methods for setting what sort of keyboard should be shown when a user taps on a UITextView…
orj
  • 13,234
  • 14
  • 63
  • 73
2
votes
0 answers

⌥ + ⌦ behaves strangely in a custom UITextInput implementation

I'm working on a crossplatform note taking application, and part of our effort includes building a text editor from the ground up that we can bring to our various platforms. For us, on iOS this means conforming to the UITextInput protocol. The…
Parth Mehrotra
  • 2,712
  • 1
  • 23
  • 31
1
vote
0 answers

UITextInputMode doesn't work for english decimal pad in iOS 13

I have two localizations in my app (English and Arabic). I have set Keyboard type for many of UITextFields to decimalPad. I need to enforce English only decimal pad for these fields. But when the app language is in Arabic, the keypad is shown in…
shujaat
  • 383
  • 4
  • 19
1
vote
1 answer

Property from UITextInputTraits can't be assigned

I encounter strange compile error when accessing UITextView as object conforming to UITextInputTraits: protocol MyEditingView:UITextInputTraits where Self: UIView { } extension UITextView:MyEditingView { } class SomeClass { var…
Vladimir
  • 7,670
  • 8
  • 28
  • 42
1
vote
2 answers

Disable microphone button in UITextField keyboard

I have a UITextField, and the keyboard shows a mic button, which I'd like to disable. I'm especially concerned that it shouldn't show on iPhone X. I already disabled the Emoji keyboard by setting the keyboard type to "ASCII Capable". Is there…