Created
March 26, 2020 12:38
-
-
Save bocato/7f0ed109e215ff1a8acb43210a7e1974 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
observeKeyboardWillShowNotification(scrollView) { [weak self] keyboardSize in | |
guard let keyboardHeight = keyboardSize?.height else { return } | |
self?.someViewYouWantToMoveBottomConstraint?.constant = -keyboardHeight | |
} | |
observeKeyboardWillHideNotification(scrollView) { [weak self] _ in | |
self?.someViewYouWantToMoveBottomConstraint?.constant = .zero | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment