                 self.messageToolbarBottomConstraint.constant = 0
                 self.view.layoutIfNeeded()
 
-                self.conversationCollectionView.contentOffset.y -= keyboardHeight
-                self.conversationCollectionView.contentInset.bottom -= keyboardHeight
+                self.conversationCollectionView.contentInset.bottom = self.messageToolbar.intrinsicContentSize().height
 
             }, completion: { (finished) -> Void in
+                var contentOffset = self.conversationCollectionViewContentOffsetBeforeKeyboardWillHide
+                contentOffset.y -= keyboardHeight
+                self.conversationCollectionView.setContentOffset(contentOffset, animated: true)
             })
         }
     }
+
+    func handleKeyboardDidHideNotification(notification: NSNotification) {
+        isKeyboardVisible = false
+    }
+
 }
 
 // MARK: UICollectionViewDataSource, UICollectionViewDelegate

    var lastTimeMessagesCount: UInt = 0

    var conversationCollectionViewHasBeenMovedToBottomOnce = false

    @IBOutlet weak var conversationCollectionView: UICollectionView!


    // MARK: Keyboard

    func handleKeyboardWillShowNotification(notification: NSNotification) {
        println("showKeyboard")

        keyboardShowTimes += 1

        conversationCollectionViewContentOffsetBeforeKeyboardWillShow = conversationCollectionView.contentOffset

        if let userInfo = notification.userInfo {

