-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
KeyboardLayoutConstraint.swift using programmatically? #68
Comments
Well, finally I've found how to use this class programmatically. Just replace awakeFromNib() with init() and you've to multiply the return value of updateConstant with minus 1. I guess this is due to the fact that the following code is reversed.
|
Thanks for that. Would you like to provide a pull request on this? We'll just need to make sure both Storyboard/Code will do the job. |
Well, it's just handy for people who want to use the file without a story board. So I don't think a pull request is ok. It doesn't add extra value to your great framework. |
@RSDrsd thanks for sharing your solution! |
When working with the storyboard and the KeyboardLayoutConstraint.swift file, the keyboard is working great and the view attached to the bottom goes up. However I want to do everything pure programmatically.
I have something like below:
I've added all the constraints, but when I run my app, the keyboard goes up, but the addMessageView which is attached to the bottom layout guide, doesn't go up. The awakeFromNib function should fire, but nothing happens. What is going wrong? Is it even possible to do something like this programmatically? I tried a lot, but nothing works. I even changed the KeyboardLayoutConstraint.swift file to look for a better function than awakeFromNib, but this also doesn't work.
The text was updated successfully, but these errors were encountered: