 	}
 	
 	// MARK: - Private -
+    
+    private func appropriateSizeForTextView() -> CGSize {
+        // WTF don't hardcode 35, use constraintWithAttribute instead
+        let sendButtonWith: CGFloat = items!.contains(sendButtonBarButtonItem) ? sendButton.frame.size.width : 0
+        let activityIndicatorWidth: CGFloat = items!.contains(activityIndicatorBarButtonItem) ? sendButton.frame.size.width : 0
+        let textViewWidth: CGFloat = frame.size.width - (sendButtonWith + activityIndicatorWidth) - 35
+        var textViewHeight: CGFloat = textView.sizeThatFits(CGSizeMake(textViewWidth, CGFloat.max)).height
+        textViewHeight = textViewHeight > maxTextHeight ? maxTextHeight : textViewHeight
+        
+        return CGSizeMake(textViewWidth, textViewHeight)
+    }
 	
 	private func updateStateBasedOnTextChange() {
 		let newItems: [UIBarButtonItem]

		if newItems.count != items?.count {
			setItems(newItems, animated: true)
		}
		
		UIView.animateWithDuration(0.15) { [weak self] in
			self?.setNeedsLayout()
			self?.layoutIfNeeded()
		}
	}
	
	// MARK: - TextInputAccessoryViewDelegate -

		
		activityIndicatorBarButtonItem.width = sendButtonBarButtonItem.width
		
        let appropriateTextViewSize = appropriateSizeForTextView()
        textView.frame = CGRectMake(0, 0, appropriateTextViewSize.width, appropriateTextViewSize.height)
		
		constraintWithAttribute(.Height)?.constant = textView.frame.size.height + textViewPadding * 2
        
