Open eviltofu opened 8 years ago
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
@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?
@JJJJJJJerk Your code doesn't even work, I can't import NYAlertView from pods.
Same issue here. I don't event know how to set the "intro button" event to hide the keyboard
This does work for me. Did you do import "NYAlertView.h"
?
@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
Well this is really crappy solution, should be stated in main page to alert users that this crucial func is not implemented
Barely usable , you turn landscape and what ... This lib is not ready for production
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?