     weak var field:UITextView!
     weak var layoutHeight:NSLayoutConstraint!
     let kMinHeight:CGFloat = 40
-    let stringDrawingOptions:NSStringDrawingOptions
-    private let marginField:CGFloat
     private let kFieldMarginVr:CGFloat = 4
     private let kBorderHeight:CGFloat = 1
-    private let kMaxHeight:CGFloat = 80
+    private let kMaxHeight:CGFloat = 75
     private let kCornerRadius:CGFloat = 4
     private let kSendButtonWidth:CGFloat = 50
     private let kHypoteticalMaxHeight:CGFloat = 10000

                    { [weak self] in
                        
                        self?.field.text = self?.kEmpty
                        
                        if self != nil
                        {
                            self!.heightForText(self!.kEmpty)
                        }
                    }
                }
            }
        }
    }
    
    private func heightForText(text:String)
    {
        let newHeight:CGFloat
        let nsString:NSString = NSString(string:text)
        let attributes:[String:AnyObject] = field.typingAttributes
        let size:CGSize = CGSizeMake(field.bounds.maxX, kHypoteticalMaxHeight)
        let rect:CGRect = nsString.boundingRectWithSize(
            size,
            options:stringDrawingOptions,
            attributes:attributes,
            context:nil)
        let height:CGFloat = ceil(rect.maxY) + marginField
        
        if height > kMaxHeight
        {

    
    //MARK: textview del
    
    func textViewDidBeginEditing(textView:UITextView)
    {
        heightForText()
    }
    
    func textViewDidEndEditing(textView:UITextView)
    {
        heightForText()
    }
    
    func textViewDidChange(textView:UITextView)
    {
        heightForText()
    }
}