From a9621a1113aba6fff58a0712459f135444733e22 Mon Sep 17 00:00:00 2001 From: etoledom Date: Tue, 26 Sep 2017 23:44:55 -0300 Subject: [PATCH] Updating scrollIndicatorInsets.bottom to match contentInset.bottom --- Sources/MessagesViewController.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Sources/MessagesViewController.swift b/Sources/MessagesViewController.swift index b98cc138..819d274a 100644 --- a/Sources/MessagesViewController.swift +++ b/Sources/MessagesViewController.swift @@ -81,6 +81,7 @@ open class MessagesViewController: UIViewController { if isFirstLayout { addKeyboardObservers() messagesCollectionView.contentInset.bottom = messageInputBar.frame.height + messagesCollectionView.scrollIndicatorInsets.bottom = messageInputBar.frame.height isFirstLayout = false } } @@ -274,11 +275,15 @@ extension MessagesViewController { if (keyboardEndFrame.origin.y + keyboardEndFrame.size.height) > view.frame.size.height { // Hardware keyboard is found - messagesCollectionView.contentInset.bottom = view.frame.size.height - keyboardEndFrame.origin.y + let bottomInset = view.frame.size.height - keyboardEndFrame.origin.y + messagesCollectionView.contentInset.bottom = bottomInset + messagesCollectionView.scrollIndicatorInsets.bottom = bottomInset + } else { //Software keyboard is found let bottomInset = keyboardEndFrame.height > messageInputBar.frame.height ? keyboardEndFrame.height : messageInputBar.frame.height messagesCollectionView.contentInset.bottom = bottomInset + messagesCollectionView.scrollIndicatorInsets.bottom = bottomInset } }