-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
The current way of keyboard event handling by adjusting the contentInset of the MessagesCollectionView is a bit limiting.
Since we pin the MessagesCollectionView to fill the superview -- we currently add top and bottom insets to account for the size of potential NavigationBars, TabBars, and of course the InputAccessoryView.
This blocks #117 because you can't adjust the top contentInset of the view to adjust for other potential views. Which is a significant limitation.
We could add an API that allows users to add an additional header to the MessagesCollectionView. Then handle the layout/contentInset based on the size of the provided view. I think this is avoiding the underlying problem and is less flexible.
Instead:
-
We should move back to using constraints to manage the position of the view instead of adjusting the
contentInset. This means no longer pinning to thesuperView. -
We should refactor all this keyboard logic into a
KeyboardTrackerobject. Keyboard handling is proving to be a pain point and we are refactoring it every other version. It's time for a dedicated solution.