Switching back to the standard keyboard for UITextField with custom InputView (monotouch)
I'm using a custom input view on a UITextField by setting its InputView property; it works great.
However, in certain conditions I need to switch back to the standard keyboard input. Intuitively, I'm trying to set InputView property to null, but 开发者_开发问答this doesn't work - an exception is thrown.
Looking at UITextField.InputView implementation, it starts like this:
public void set_InputView(UIView value)
{
if (!value)
{
throw new ArgumentNullException(value);
}
...
So, it is obvious that setting InputView to null is no-go ...
Does anybody know how it can be done?
Thank you
This was a bug in the bindings, I've fixed it and the next release will accept null. In the mean time you could set it to null with a workaround:
NSObject nil = new NSObject (IntPtr.Zero);
this.InputView = nil;
精彩评论