kulpreetchilana / Custom-iOS-Keyboards

Easily customizable custom inputView for iOS that imitates the native iOS keyboard.
474 stars 119 forks source link

How to make your keyboard work with UIWebview #1

Open garudaonekh opened 11 years ago

garudaonekh commented 11 years ago

Hi, thanks for your great control. But i need to make it work with UIWebview for editing Rich Text data.

Any suggestion is much appreciated.

Regards;

ataranlen commented 11 years ago

I looked at modifying PK/PMCustomKeyboard class method "-(void)setTextView:textView " to include:

else if ([textView isKindOfClass:[UIWebView class]]) [(UIWebView *)textView setInputView:self];

But a UIWebView doesn't have an method for setInputView. This is contrary to what the apple docs say:

"You are not limited to input views and input accessory views in framework-supplied text objects. Any class inheriting directly or indirectly from UIResponder (usually a custom view) can specify its own input view and input accessory view. The UIResponder class declares two properties for input views and input accessory views:"

And a UIWebView does inherit indirectly from UIResponder.

The more I look into it, the more I think this isn't possible to do.

garudaonekh commented 11 years ago

Thanks for your effort! I am still finding a way to make it work for my language keyboard but no luck so far