From 6ff4bd7bc0df57c3bc401ef7d03e07bb923c2f1b Mon Sep 17 00:00:00 2001 From: Kino Date: Sat, 18 Jul 2020 15:57:21 -0700 Subject: [PATCH] Scroll to bottom on keyboard begins editing --- Example/Sources/Views/SwiftUI/MessagesView.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Example/Sources/Views/SwiftUI/MessagesView.swift b/Example/Sources/Views/SwiftUI/MessagesView.swift index cc04a6f5..efd7843d 100644 --- a/Example/Sources/Views/SwiftUI/MessagesView.swift +++ b/Example/Sources/Views/SwiftUI/MessagesView.swift @@ -34,6 +34,8 @@ struct MessagesView: UIViewControllerRepresentable { messagesVC.messagesCollectionView.messagesLayoutDelegate = context.coordinator messagesVC.messagesCollectionView.messagesDataSource = context.coordinator messagesVC.messageInputBar.delegate = context.coordinator + messagesVC.scrollsToBottomOnKeyboardBeginsEditing = true // default false + messagesVC.maintainPositionOnKeyboardFrameChanged = true // default false return messagesVC }