         conversationCollectionView.registerNib(UINib(nibName: chatLeftTextCellIdentifier, bundle: nil), forCellWithReuseIdentifier: chatLeftTextCellIdentifier)
         conversationCollectionView.registerNib(UINib(nibName: chatRightTextCellIdentifier, bundle: nil), forCellWithReuseIdentifier: chatRightTextCellIdentifier)
 
-        var contentInset = conversationCollectionView.contentInset
-        contentInset.bottom = messageToolbar.intrinsicContentSize().height
-        conversationCollectionView.contentInset = contentInset
+        setConversaitonCollectionViewOriginalContentInset()
 
         messageToolbarBottomConstraint.constant = 0
 
-        updateMessageToolbarWithKeyboardChange = true
+        updateUIWithKeyboardChange = true
     }
 
+    // MARK: Private
+
+    private func setConversaitonCollectionViewOriginalContentInsetBottom(bottom: CGFloat) {
+        var contentInset = conversationCollectionView.contentInset
+        contentInset.bottom = bottom
+        conversationCollectionView.contentInset = contentInset
+    }
+
+    private func setConversaitonCollectionViewOriginalContentInset() {
+        setConversaitonCollectionViewOriginalContentInsetBottom(messageToolbar.intrinsicContentSize().height)
+    }
 
     // MARK: Keyboard
 

            UIView.animateWithDuration(animationDuration, delay: 0, options: UIViewAnimationOptions(animationCurveValue), animations: { () -> Void in
                self.messageToolbarBottomConstraint.constant = keyboardHeight
                self.view.layoutIfNeeded()
                }, completion: { (finished) -> Void in
            })
        }
    }



    // 使 messageToolbar 随着键盘出现或消失而移动
    var updateUIWithKeyboardChange = false {
        willSet {
            keyboardChangeObserver = newValue ? NSNotificationCenter.defaultCenter() : nil
        }
