-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
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.