4

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

Costique
  • 23,712
  • 4
  • 76
  • 79
eozzy
  • 66,048
  • 104
  • 272
  • 428

3 Answers3

1

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

Community
  • 1
  • 1
Rivera
  • 10,792
  • 3
  • 58
  • 102
1

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.

Jonathan Grynspan
  • 43,286
  • 8
  • 74
  • 104
  • It kind of an arabic keyboard but with many additional glyphs. Arabic keyboard is available on iOS and with several layouts, so even if I could auto-create and enable a custom layout for arabic lang when my app is installed? – eozzy Dec 18 '11 at 17:40
  • A similar app http://bit.ly/vcrxys has a custom keyboard, I also see a "EN" at the bottom. not sure how they do it. – eozzy Dec 18 '11 at 17:42
  • oh can I allow two-finger slide to show the default keyboards and slide back to custom keyboard? – eozzy Dec 18 '11 at 18:08
  • Why don't you try and see? :) – Jonathan Grynspan Dec 18 '11 at 18:20
0

What you need is making a custom keyboard check this:

App Extension Programming Guide

Moataz Hossam
  • 413
  • 7
  • 20