hackiftekhar/IQKeyboardManager

Cannot disable automatic toolbar creation for a specific field

r00li opened this issue · 6 comments

I am having a problem with the latest version of IQKeyboardManager. I cannot disable automatic keyboard toolbar creation for a specific field. I need the default toolbars on all my textfields except one. This one needs a custom toolbar. In the older version of IQKeyboardManager this worked fine:

UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, picker.frame.size.width, 45)];
UIBarButtonItem *asapButton = [[UIBarButtonItem alloc] initWithTitle:@"ASAP" style:UIBarButtonItemStylePlain target:self action:@selector(departTimeASAPButtonPressed:)];
asapButton.tintColor = [UIColor blackColor];

UIBarButtonItem *flexibleSpace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];

UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStyleDone target:self action:@selector(departTimePickerDoneButtonPressed:)];
doneButton.tintColor = [UIColor blackColor];

toolbar.items = @[asapButton, flexibleSpace, doneButton];
self.timeSelectionTextField.inputAccessoryView = toolbar;

But I still get the default IQKeyboardManager toolbar when the keyboard shows up.

I also tried this: self.timeSelectionTextField.inputAccessoryView = [[UIView alloc] init]; but it doesn't work either - toolbar is still there.

self.timeSelectionTextField.inputAccessoryView = [[UIView alloc] init];
Same thing is working on demo app. under 'Manual UITollbar + No UIToolbar' section. Could you provide me demo app so that I can debug it.

Any updates on this?

Sorry it took a while to respond. Here is a link to a basic demo project:
http://r00li.com/downloads/blabla.zip

As I mentioned. Neither creating a toolbar manually or setting an empty view works. IQKeyboardManager toolbar always appears. And this code was working with previous versions.

Hey r00li,
I've already fixed that in new version. However I didn't push it on cocoapods. I'll release a new version very shortly specially for you.

Thanks
Iftekhar

Just release v3.2.0.1 through cocoapods.

remove toolbar. Just use datepicker ;)