1

I have developed a custom keyboard with a view and a view controller. In my application's main view controller, I hold a property for the custom keyboard view controller.

I have a textView which should get input from the custom keyboard. The customKeyboard property is the view controller for the custom keyboard.

I put the following in viewDidLoad of the main application's viewController.

self.textView.inputView = self.customKeyboard.view;

The standard system keyboard appears when I make the textView first responder. IB appears to be linking my textView property to the UI component. What do I need to do to get the custom keyboard to appear?

Neysor
  • 3,893
  • 11
  • 34
  • 66
  • maybe instead of dot notation you can try [textView setInput:customKeyboard.view]. Maybe also check to make sure that your customKeyboard is properly getting initalized and retained. Hope this helps – tams Mar 18 '12 at 02:52
  • The two are equivalent, using setX: or .x= call the same code – hypercrypt Mar 07 '13 at 15:25

1 Answers1

5

Try some calls to [self.textView reloadInputViews]. If that doesn't work, try to subclass UITextView and override its inputView method such that it always returns the view you want to use as the custom keyboard.

MrMage
  • 7,282
  • 2
  • 41
  • 71