eozzy
eozzy

Reputation: 68650

Custom keyboard with regular keyboards?

I'm creating an app that uses a custom keyboard, now if I provide the default English keyboard using the same globe icon that iOS uses, it should be able to switch to the default English keyboard fine, but I'm not sure if the user can return back to my custom keyboard from the system keyboards (assuming the user has more than 1 keyboards).

Can someone please confirm if that would be possible?

Thanks

Upvotes: 4

Views: 1024

Answers (3)

Moataz Hossam
Moataz Hossam

Reputation: 413

What you need is making a custom keyboard check this:

App Extension Programming Guide

Upvotes: 0

E. Rivera
E. Rivera

Reputation: 10938

You should set an inputAccessoryView in your UITextView with a button to toggle between your custom and the standard keyboards.

Every time the user taps the button you change myTextView.inputView between your custom keyboard and nil, which restores the original keyboard.

https://developer.apple.com/library/ios/documentation/uikit/reference/UITextField_Class/Reference/UITextField.html#//apple_ref/occ/instp/UITextField/inputView

You'll also need to reassign first responder, and also try to animate it if you want:

Animating UITextInput's textInputView

Upvotes: 2

Jonathan Grynspan
Jonathan Grynspan

Reputation: 43472

It's not. the system keyboards have no "switch to custom keyboard" button. They're not even aware you made a custom keyboard.

What is it you're trying to accomplish? Why are you building a custom keyboard? If you tell us, maybe we can suggest an alternate way to do what you need to do.

Upvotes: 1

Related Questions