-
Notifications
You must be signed in to change notification settings - Fork 494
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
HUD moves to accomodate keyboard #179
base: master
Are you sure you want to change the base?
Conversation
Unit tests are passing. I'm not sure why the travis build is failing. |
Hi @MendyK and thanks for the PR. Can you add a screenshot and put an example in the demo project? Don't worry about Travis, unfortunately there is a bug on Travis and some builds sometimes (very often) fail without any reason |
@PGLongo I didn't want to change the current demo, so I made a new demo target. Is that okay? |
Please don't add a new demo target. Add an hidden textfield and a new button in the actual target |
There are two little problem with your implementation:
override func viewDidLoad() {
super.viewDidLoad()
// HUD.dimsBackground = false
//HUD.allowsInteraction = true
} You can easily fix this two issue moving the registerForKeyboardNotifications outside the common init and force the user to register and then unregister |
What do you mean by "force the user to register and then unregister"? |
Call something like |
@PGLongo I also got rid of the keyboard demo target and added a hidden textfield to the demo project as you suggested |
@PGLongo Is there anything else I can do? |
Sorry for the delay @MendyK. Unfortunately I need more time for review and tests. I will try to merge this PR in the next two weeks |
@MendyK I'm deeply sorry for the delay. If you fix the conflict I will test and merge this PR. Thanks |
@PGLongo Sorry for the delay on my end. I fixed the conflict |
what happened to this pull request? can this still be merged? |
@PGLongo this pull request can now be closed. |
Until now the HUD would stay in the center of the screen, even when the keyboard was up.
My implementation makes it so that if the keyboard is up and
HUD.flash()
is called, the HUD moves to the center between the keyboard and the top of the container view.if the HUD is on screen when the keyboard is popping up or down, the HUD will animate up and down in order to not block the keyboard.