Will you implement a dark mode?
Will you support a dark mode to match the UIKeyboard dark mode? As it stands, your toolbar sticks out against the dark mode keyboard. Thanks
@JustinDMoore this is already implemented i think. In my own app this is done automatically.
there is code in IQKeyboardManager.m file inside the addToolbarIfRequired method.
switch ([(UITextField*)textField keyboardAppearance]){ ....
Do you have an example where this does not work as expected?
I just began using IQKeyboardManager via pods today (latest version). All of my keyboards default to dark mode, but the toolbar is always light. There is no specific example other than it just isn't working for me. Is there a property I need to set that you're aware of? I didn't see one in the documentation. Thanks.
Having looked at the method you mentioned, are you referring to _shouldToolbarUsesTextFieldTintColor?
there is a
case UIKeyboardAppearanceAlert:
{
toolbar.barStyle = UIBarStyleBlack;
have you set the keyboardappearence to UIKeyboardAppearanceAlert?

the image below is from the demo project.

In my AppDelegate, I set the following: [[IQKeyboardManager sharedManager] setShouldShowTextFieldPlaceholder:NO]; [[IQKeyboardManager sharedManager] setToolbarManageBehaviour:IQAutoToolbarByPosition]; [[IQKeyboardManager sharedManager] setKeyboardAppearance:UIKeyboardAppearanceAlert];
Is that not correct for the keyboard appearance?
you should also set the overrideKeyboardAppearance like this before:
[[IQKeyboardManager sharedManager] setOverrideKeyboardAppearance:YES];
Modifying it to include overrideKeyboardAppearance didn't have any effect. Can't understand what is missing. [[IQKeyboardManager sharedManager] setOverrideKeyboardAppearance:YES]; [[IQKeyboardManager sharedManager] setShouldShowTextFieldPlaceholder:NO]; [[IQKeyboardManager sharedManager] setToolbarManageBehaviour:IQAutoToolbarByPosition]; [[IQKeyboardManager sharedManager] setKeyboardAppearance:UIKeyboardAppearanceAlert];
can you try setting the KeyboardAppearance directly to a textfield and see if it works. if it does then maybe the OverrideKeyboardAppearance is not working as it should
I've tried every combination I could think of.. changing UIKeyboardAppearanceAlert to UIKeyboardAppearanceDark.. with and without setOverrideKeyboardAppearance.. and setting the textfield directly. The keyboard itself will reflect light/dark mode accordingly, but the toolbar never changes.
maybe @hackiftekhar can help here. I have exhausted all my ideas. I tried the following 2 lines in my project as well inside a uitableview full of textfields and all are working fine.
[[IQKeyboardManager sharedManager] setOverrideKeyboardAppearance:YES];
[[IQKeyboardManager sharedManager] setKeyboardAppearance:UIKeyboardAppearanceAlert];
maybe if you could setup a small demo project it would be easier to help debug this...
@Justin, actually the pod is not updated yet. Current I'm going with a very busy schedule without having internet connectivity. I'll update the pod when got sometime to update it.
@mythodeia , thanks for the help.
:+1:
Ok thanks. Good to know I'm not crazy!
Release new cocoapods version 3.2.1.1. This contains the dark mode implementation. Thanks for your patience.
Thanks so much. Updating soon.