views:

26

answers:

1

I am trying to replace the Standard Keyboard on the iPhone with a custom one which I have created in MainKeyboard.xib, which is linked to the UIView outlet mainKeyboard. I have the following code that executes when the main view loads, and I have also tried triggering it with a UIButton for testing purposes.

[[NSBundle mainBundle] loadNibNamed:@"MainKeyboard" owner:self options:nil]; 
[textView resignFirstResponder];
textView.inputView = mainKeyboard;
[textView becomeFirstResponder];

However, nothing happens to the keyboard. Bizarrely, I have taken this code from my own iPad app where it works fine! Are there any differences between the way the iPhone and the iPad deal with the keyboard? Or am I just doing something silly?

Thanks in advance!

Dave

A: 

Do you mean that File Owner is connected to the IBOutlet in UIBuilder? That's definitely done! Thanks for the suggestion though.

Dave
Oops, didn't mean to add that as an answer!
Dave