Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot disable automatic toolbar creation for a specific field #89

Closed
r00li opened this issue Oct 10, 2014 · 6 comments
Closed

Cannot disable automatic toolbar creation for a specific field #89

r00li opened this issue Oct 10, 2014 · 6 comments
Assignees
Labels

Comments

@r00li
Copy link

r00li commented Oct 10, 2014

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.

@hackiftekhar
Copy link
Owner

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.

@hackiftekhar
Copy link
Owner

Any updates on this?

@r00li
Copy link
Author

r00li commented Oct 13, 2014

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.

@hackiftekhar
Copy link
Owner

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

@hackiftekhar
Copy link
Owner

Just release v3.2.0.1 through cocoapods.

@hackiftekhar hackiftekhar self-assigned this Jan 7, 2015
@yunustek
Copy link

yunustek commented Mar 15, 2018

remove toolbar. Just use datepicker ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants