          if wordCountLabel != nil {
             wordCountLabel?.removeFromSuperview()
         }
-        wordCountLabel = UILabel(frame: CGRect(x: self.frame.size.width - 65, y: self.frame.size.height - 20, width: 60, height: 20))
+        wordCountLabel = UILabel(frame: CGRect(x: 0, y: self.frame.size.height - 20, width: self.frame.size.width - 10, height: 20))
         wordCountLabel?.textAlignment = .right
         wordCountLabel?.textColor = self.limitLabelColor
         wordCountLabel?.font = self.limitLabelFont
-        if self.text.characters.count > limitLength.intValue {
+        if self.text.count > limitLength.intValue {
             self.text = (self.text as NSString).substring(to: limitLength.intValue)
         }
-        wordCountLabel?.text = "\(self.text.characters.count)/\(limitLength)"
+        wordCountLabel?.text = "\(self.text.count)/\(limitLength)"
         addSubview(wordCountLabel!)
+        self.contentInset = UIEdgeInsetsMake(0, 0, 20, 0)
+
     }
     
     


        if placeholder != nil {
            placeholderLabel?.isHidden = true
            if self.text.characters.count ==  0 {
                self.placeholderLabel?.isHidden = false
            }
        }
        if limitLength != nil {
            var wordCount = self.text.characters.count
            if wordCount > (limitLength?.intValue)! {
                wordCount = (limitLength?.intValue)!
            }
            let limit = limitLength!.stringValue
            wordCountLabel?.text = "\(wordCount)/\(limit)"
        }
        
    }

    @objc fileprivate func limitLengthEvent() {
        if limitLength != nil {
            if self.text.characters.count > (limitLength?.intValue)! && limitLength != nil {
                self.text = (self.text as NSString).substring(to: (limitLength?.intValue)!)
                print("Maximum number of words");
            }

            /*
             *  避免外部使用了约束 这里再次更新frame
             */
            wordCountLabel!.frame = CGRect(x: 0, y: frame.height - 20 + contentOffset.y, width: frame.width - 10, height: 20)
        }
        if placeholder != nil && placeholderLabel != nil {
            let rect: CGRect = placeholder!.boundingRect(with: CGSize(width: frame.width - 7, height: CGFloat.greatestFiniteMagnitude), options: .usesLineFragmentOrigin, attributes: [NSFontAttributeName: UIFont.systemFont(ofSize: 13.0)], context: nil)
            placeholderLabel!.frame = CGRect(x: 7, y: 7, width: rect.size.width, height: rect.size.height)
        }
        if autoHeight == true {
            self.oldFrame = self.frame
            self.isScrollEnabled = false
        }else {
            self.isScrollEnabled = true
        }
    }

}
