Questions tagged [uikeyinput]

27 questions
40
votes
10 answers

How to detect delete key on an UITextField in iOS 8?

I have subclassed UITextField and implemented the UIKeyInput protocol's deleteBackward method to detect backspace being pressed. This works fine on iOS 7 but not on iOS 8. deleteBackward is not called on the UITextField anymore when I press the…
VNVN
  • 501
  • 1
  • 4
  • 7
5
votes
2 answers

Xcode UI Test UIKeyInput typeText

During Xcode UI Testing, how do I insertText for a UIView that conforms to UIKeyInput? I created a CodeInputView that conforms to UIKeyInput. When I record myself manually entering a code, Xcode writes app.typeText("1234"). But, when I try to play…
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
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
3
votes
1 answer

How do I detect the return key being pressed and respond to it using the UIKeyInput protocol?

I have a table view that displays a list that I want the user to be able to edit. In order to save space, and to make my view easier on the eyes, I have created a custom toolbar that conforms to the UIKeyInput protocol so that I can pull up a…
Sam Hazleton
  • 470
  • 1
  • 5
  • 21
3
votes
1 answer

UIKeyInput not available on iPad?

I have implemented the UIKeyInput protocol method - (void)deleteBackward but when the code is running on an iPad and I press the delete button on the keyboard it does not execute the method. Is this protocol disabled on ipad?
christina
  • 31
  • 2
3
votes
0 answers

How to get words from quicktype of default keyboard

I have custom TextView to edit text with simple UIKeyInput. When I select word from quick type suggestions it sends empty string to - (void) insertText:(NSString *)text How to get word from quick type?
Volodymyr B.
  • 3,369
  • 2
  • 30
  • 48
2
votes
0 answers

Type ahead issue with UIKeyInput

I have a controller that is taking custom key input and displaying it in a unique way. It becomes the key responder and implements UIKeyInput. https://developer.apple.com/reference/uikit/uikeyinput It was implemented in 8.0, before the typeahead…
bshirley
  • 8,217
  • 1
  • 37
  • 43
2
votes
0 answers

iOS key strokes without displaying keyboard

I have an external scanner which basically emulates key strokes if the keyboard is active. I tested and whenever the textfield focus is on, it emulates the key strokes. But i don't want to show the keyboard to user. Can i get the key strokes without…
2
votes
0 answers

inputAccessoryView occasionally does not receive initial touch

Ever since iOS 8 and custom keyboards were introduced the inputAccessoryView in my app occasionally drops touches. Primarily when users attempt to hit a key on it after quickly typing on the system keyboard. If the user types slowly and presses the…
simeon
  • 4,466
  • 2
  • 38
  • 42
2
votes
1 answer

UITextfield subclass not responding to insertText: method of UIKeyInput protocol

I want to observe the text input in a UITextfield subclass. For that I m trying to implement UIKeyInput protocol methods in that subclass. But the insertText: and hasText methods are never called. However deleteBackward method is called. Do you know…
sridevi
  • 617
  • 1
  • 6
  • 15
2
votes
1 answer

Why does a certain Protocol work without a class that implements it?

I have worked quite a lot with protocols like delegates and data sources and I recently worked on something using the UIKeyInput protocol. I am used to things like self.tableView.delegate = self but with UIKeyInput I didn't need to that. But the…
Dario
  • 1,315
  • 1
  • 11
  • 24
2
votes
0 answers

How to find the text for a given returnKeyType?

Here is a question concerning the UITextInputTraits protocol. In the documentation, section Managing the Keyboard Behavior, one can see the property: returnKeyType. It takes its possible values from this: typedef enum { UIReturnKeyDefault, …
Michel
  • 10,303
  • 17
  • 82
  • 179
2
votes
4 answers

how to make a keyboard in other language in iOS

I want to create a khmer keyboard which is different from iPhone keyboard. How can I do that ?
user1584341
1
vote
1 answer

Why does -[UIKeyInput hasText] always return NO for UITextField?

Why does -[UIKeyInput hasText] always return NO for UITextField? Is this a bug with UIKit? For example, the following test fails: UITextField *textField = [[UITextField alloc] initWithFrame:CGRectZero]; textField.text = @"has…
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
1
vote
1 answer

Prediction view is under keyboard keys

I have an UILabel subclass, conforming UIKeyInputs protocol. But when the keyboard is shown, prediction view is under keyboard keys: Here is the screenshot: And here is the implementation: class CustomLabel: UILabel { // some implementation,…
Arda Oğul Üçpınar
  • 881
  • 1
  • 14
  • 38
1
2