                 contentOffset.y -= keyboardHeight
                 //println("\(self.conversationCollectionViewContentOffsetBeforeKeyboardWillHide.y) \(contentOffset.y) \(self.conversationCollectionViewContentOffsetBeforeKeyboardWillHide.y-contentOffset.y)")
                 self.conversationCollectionView.setContentOffset(contentOffset, animated: false)
-                self.conversationCollectionView.contentInset.bottom = self.messageToolbar.intrinsicContentSize().height
+                self.conversationCollectionView.contentInset.bottom = CGRectGetHeight(self.messageToolbar.bounds)
 
             }, completion: { (finished) -> Void in
 

        return CGSizeMake(collectionViewWidth, height)
    }

    func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
        view.endEditing(true)
    }

    @IBOutlet weak var messageToolbar: MessageToolbar!
    @IBOutlet weak var messageToolbarBottomConstraint: NSLayoutConstraint!

    let sectionInsetTop: CGFloat = 10
    let sectionInsetBottom: CGFloat = 10

    let messageTextAttributes = [NSFontAttributeName: UIFont.systemFontOfSize(13)] // TODO: 用配置来决定
    let messageTextLabelMaxWidth: CGFloat = 320 - (15+40+20) - 20 // TODO: 根据 TextCell 的布局计算

