I'm working on an iOS 8 keyboard extension, and currently when the user taps on my Return key I'm running this code:
[self.textDocumentProxy insertText:@"\n"];
This works as expected in most places. However, in the Contacts app, if I edit a contact, select the first name field, and press Return, nothing happens. It does not move to the next field as expected. This is in contrast to the default keyboard, which does move to the next field.
Am I doing something wrong?
Yes. Actually every textDocumentProxy will have it's UIReturnKeyType. Depending on which the method, used by your Return key should be changed.
typedef NS_ENUM(NSInteger, UIReturnKeyType) {
UIReturnKeyDefault,
UIReturnKeyGo,
UIReturnKeyGoogle,
UIReturnKeyJoin,
UIReturnKeyNext,
UIReturnKeyRoute,
UIReturnKeySearch,
UIReturnKeySend,
UIReturnKeyYahoo,
UIReturnKeyDone,
UIReturnKeyEmergencyCall,
};
In your case, please implement jump to the next responder if you see that current self.textDocumentProxy.returnKeyType
returns UIReturnKeyNext
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With