         state = .Default
     }
 
+    var messageTextViewMinHeight: CGFloat {
+        let textContainerInset = messageTextView.textContainerInset
+        return ceil(messageTextView.font!.lineHeight + textContainerInset.top + textContainerInset.bottom)
+    }
+
     func makeUI() {
 
         self.addSubview(messageTextView)


        let messageTextViewConstraintsV = NSLayoutConstraint.constraintsWithVisualFormat("V:|-7-[messageTextView]-8-|", options: [], metrics: nil, views: viewsDictionary)

        let textContainerInset = messageTextView.textContainerInset
        let constant = ceil(messageTextView.font!.lineHeight + textContainerInset.top + textContainerInset.bottom)
        //println("messageTextViewHeight: \(constant)")
        messageTextViewHeightConstraint = NSLayoutConstraint(item: messageTextView, attribute: .Height, relatedBy: .Equal, toItem: nil, attribute: .NotAnAttribute, multiplier: 1, constant: constant)
        messageTextViewHeightConstraint.priority = UILayoutPriorityDefaultHigh

        let constraintsH = NSLayoutConstraint.constraintsWithVisualFormat("H:|[micButton(48)][messageTextView][moreButton(==micButton)]|", options: [], metrics: nil, views: viewsDictionary)

                messageTextView.hidden = true
                voiceRecordButton.hidden = false

                messageTextView.text = ""

                micButton.setImage(UIImage(named: "icon_keyboard"), forState: .Normal)
                moreButton.setImage(UIImage(named: "item_more"), forState: .Normal)
