jessesquires/JSQMessagesViewController — pull request #373 by virl (2014-06-21 01:37:49+00:00)
Title: Facebook Messenger / Telegram scrolling and customizations

Implemented new default scrolling behavior (like in Facebook Messenger and Telegram apps):

1. When user start entering message's text (textView becomes firstResponder), collectionView (shrinked by keyboard) must scroll DOWN to display at its bottom border the same message that were here before keyboard was shown. That must work even if bottom visible message is NOT last message of conversation.
2. When user dismisses the keyboard without sending the message, collectionView must grow back and scroll UP to display at its bottom the message that were at the bottom when the keyboard was displayed (but it can be message that is not last in conversation).
3. If new message is received and previous last message of conversation is visible (is present on screen), then collectionView must autoscroll DOWN to display new message.
4. If new message is received and previous last message is NOT visible, collectionView must NOT scroll.
5. If user sends message, collectionView must scroll all the way down to display message sent.
6. When user enters multiple lines in textView and it grows, collectionView now properly scrolls down to keep displayed message on its place.

Also implemented dismissal of keyboard via tapping on collectionView (can be turned off by keyboardHidesByTappingCollection) and ability to turn off dismissal of keyboard via pan gesture (keyboardHidesByPanGesture option).

When receiving new message, user code now must call additional method - startReceivingMessage.

Also fixed #368.