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

IOS7: after navigator back from previous view, toolbar position moved to left. #52

Closed
Jession opened this issue May 30, 2014 · 7 comments
Assignees
Labels

Comments

@Jession
Copy link

Jession commented May 30, 2014

-1
-2
-3

@hackiftekhar
Copy link
Owner

Please provide sample code to debug & fix.

@Jession
Copy link
Author

Jession commented Jun 3, 2014

@Jession
Copy link
Author

Jession commented Jun 5, 2014

Hi, my current solution is resign first response on TextField before navigation to next view.

@hackiftekhar
Copy link
Owner

Just a frame change for now(Temporary solution)

In IQUIView+IQKeyboardToolbar.m GoTo:-

  • (void)addDoneOnKeyboardWithTarget:(id)target action:(SEL)action titleText:(NSString*)titleText

and change this line
buttonFrame = CGRectMake(0, 0, toolbar.frame.size.width-50.0-8, 44);

with this
buttonFrame = CGRectMake(0, 0, toolbar.frame.size.width-66.0-8, 44);

I'll update the github repository soon.

@Jession
Copy link
Author

Jession commented Jun 5, 2014

I found the code:
IQToolBar.m GoTo: - (void) layoutSubviews;

this line will cause frame width adjust to 96: (should be 320)
[self sizeToFit];

please check it.

@hackiftekhar
Copy link
Owner

Fixed

@Legoless
Copy link
Contributor

This issue still persists. In my case the viewController that has the text field on it is a child view controller and is embedded into another one. In this case, same issue reappears, because in the issue fix, the width of toolbar is taken from the child view controller. Why is this even done this way? Toolbar should be same width as keyboard, regardless of what view controller is presenting it.

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