hackiftekhar / IQKeyboardManager

Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more.
MIT License
16.43k stars 2.4k forks source link

How can I hide the toolbar when an external keyboard is attached? #903

Closed jlubeck closed 7 years ago

jlubeck commented 7 years ago

Basically what the title says 😄

Thanks!

jlubeck commented 7 years ago

I found a way to find how to detect external keyboard, but I'm running

[IQKeyboardManager sharedManager].enableAutoToolbar = NO;

And it is not removing it. I put a breakpoint on your code and removeToolbarIfRequired is being called, and textField.inputAccessoryView = nil; as well. But the toolbar is still there.

hackiftekhar commented 7 years ago

Are you sure you are't using your own inputAccessoryView?

jlubeck commented 7 years ago

Yes, completely sure. I don't use a custom inputAccesoryView anywhere in my code

hackiftekhar commented 7 years ago

Probably textField needs to use reloadInputView method.