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

Auto Scroll to Bottom On Keyboard Reveal #78

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Auto Scroll to Bottom On Keyboard Reveal #78

wants to merge 2 commits into from

Conversation

jasonaibrahim
Copy link
Contributor

Feature Request

Scroll to the bottom of the scroll view when the keyboard is revealed (e.g. the Messages app)

Implementation

Add an instance variable to MessageViewController - scrollsToBottomOnKeyboardReveal, check if value is set inside keyboardWillShow block, and scroll to bottom of scroll view if true. Default is set to true.

@@ -86,6 +86,7 @@ open class MessageViewController: UIViewController, MessageAutocompleteControlle
internal var scrollView: UIScrollView?
internal var keyboardHeight: CGFloat = 0
internal var isMessageViewHidden = false
internal var scrollsToBottomOnKeyboardReveal = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this default be false since it'd change behavior w/out warning to anyone that upgrades?

@jasonaibrahim
Copy link
Contributor Author

@rnystrom default now false :)

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

Successfully merging this pull request may close these issues.

2 participants