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

UITextfield covered by Keyboard #16

Open
eviltofu opened this issue Jan 8, 2016 · 8 comments
Open

UITextfield covered by Keyboard #16

eviltofu opened this issue Jan 8, 2016 · 8 comments

Comments

@eviltofu
Copy link

eviltofu commented Jan 8, 2016

When the message is long,and there is a UITextField under it, the UITextField is covered by the keyboard. Is there a way to shift the UITextField to uncover it?

@JJJJJJJerk
Copy link

NYAlertView line 295 _backgroundViewVerticalCenteringConstraint set this constant to be -55.

NYAlertView *view = (NYAlertView *)alertViewController.view;
view.backgroundViewVerticalCenteringConstraint.constant = -55.f;

+@Property (nonatomic, readonly) NSLayoutConstraint *backgroundViewVerticalCenteringConstraint;
still you can set the constraint.constant value

@vertrax
Copy link

vertrax commented Mar 29, 2016

@JJJJJJJerk Im sorry I don't understand your answer, can you please elaborate? Would this make the view controller scroll up as the keyboard is shown? Or what?

@vertrax
Copy link

vertrax commented Mar 30, 2016

@JJJJJJJerk Your code doesn't even work, I can't import NYAlertView from pods.

@csacanam
Copy link

Same issue here. I don't event know how to set the "intro button" event to hide the keyboard

Screenshot

@the-freshlord
Copy link

This does work for me. Did you do import "NYAlertView.h"?

@tbass134
Copy link

@JJJJJJJerk has the right idea.
by getting access to the NYAlertAction's backgroundViewVerticalCenteringConstraint, you can move up the textField to a certain extent.

let alert:NYAlertViewController = NYAlertViewController(nibName: nil, bundle: nil) alert.title = "title alert.message = "message" let alertView = alert.view as! NYAlertView alertView.backgroundViewVerticalCenteringConstraint.constant = -55

although its not the best solution. but it gets the job done for me

@renetik
Copy link

renetik commented Sep 22, 2019

Well this is really crappy solution, should be stated in main page to alert users that this crucial func is not implemented

@renetik
Copy link

renetik commented Sep 22, 2019

Barely usable , you turn landscape and what ... This lib is not ready for production

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

No branches or pull requests

7 participants