     }
 
     func didInitialized() {
-        tintColor = TextFieldTintColor;
+        tintColor = TextFieldTintColor
         delegate = self
-        addTarget(self, action:#selector(handleTextChangeEvent(_:)), for: .editingChanged)
-    }
-    
+        addTarget(self, action: #selector(handleTextChangeEvent(_:)), for: .editingChanged)
+    }
+
     deinit {
         delegate = nil
         originalDelegate = nil
     }
-    
+
     func updateAttributedPlaceholderIfNeeded() {
         if let _ = placeholder {
             attributedPlaceholder = NSAttributedString(string: placeholder!, attributes: [NSAttributedStringKey.foregroundColor: placeholderColor])
         }
     }
-    
+
     // MARK: TextInsets
-    
+
     override func textRect(forBounds bounds: CGRect) -> CGRect {
         let newBounds = bounds.insetEdges(textInsets)
         let resultRect = super.textRect(forBounds: newBounds)
-        return resultRect;
-    }
-    
+        return resultRect
+    }
+
     override func editingRect(forBounds bounds: CGRect) -> CGRect {
         let newBounds = bounds.insetEdges(textInsets)
         return super.editingRect(forBounds: newBounds)
     }
-    
+
     // MARK: TextPosition
-    
+
     override func layoutSubviews() {
         super.layoutSubviews()
-        
+
         // 以下代码修复系统的 UITextField 在 iOS 10 下的 bug：https://github.com/QMUI/QMUI_iOS/issues/64
         if IOS_VERSION < 10.0 {
             return
         }
-        
+
         guard let scrollView = subviews.first as? UIScrollView else {
             return
         }
-        
+
         // 默认 delegate 是为 nil 的，所以我们才利用 delegate 修复这 个 bug，如果哪一天 delegate 不为 nil，就先不处理了。
         if scrollView.delegate != nil {
             return
         }
-        
-        scrollView.delegate = self;
-    }
-    
+
+        scrollView.delegate = self
+    }
+
     // MARK: UIScrollViewDelegate
-    
+
     func scrollViewDidScroll(_ scrollView: UIScrollView) {
         // 以下代码修复系统的 UITextField 在 iOS 10 下的 bug：https://github.com/QMUI/QMUI_iOS/issues/64
         guard let subView = subviews.first as? UIScrollView else {
             return
         }
-        
+
         if scrollView != subView {
             return
         }
-        
+
         var lineHeight = (defaultTextAttributes[NSAttributedStringKey.paragraphStyle.rawValue] as! NSParagraphStyle).minimumLineHeight
-        
+
         if lineHeight == 0 {
             lineHeight = (defaultTextAttributes[NSAttributedStringKey.font.rawValue] as! UIFont).lineHeight
         }
-        
+
         if scrollView.contentSize.height > ceil(lineHeight) && scrollView.contentOffset.y < 0 {
             scrollView.contentOffset = CGPoint(x: scrollView.contentOffset.x, y: 0)
         }
     }
-    
+
     @objc private func handleTextChangeEvent(_ textField: QMUITextField) {
         // 1、iOS 10 以下的版本，从中文输入法的候选词里选词输入，是不会走到 textField:shouldChangeCharactersInRange:replacementString: 的，所以要在这里截断文字
         // 2、如果是中文输入法正在输入拼音的过程中（markedTextRange 不为 nil），是不应该限制字数的（例如输入“huang”这5个字符，其实只是为了输入“黄”这一个字符），所以在 shouldChange 那边不会限制，而是放在 didChange 这里限制。

        set {
            let textBeforeChange = super.text
            super.text = newValue
            
            if shouldResponseToProgrammaticallyTextChanges && textBeforeChange?.isEqual(newValue) ?? false {
                fireTextDidChangeEvent(forTextField: self)
            }
        }
    }
    
    override var attributedText: NSAttributedString? {
        get {
            return super.attributedText

                            }
                        }
                    }

                    if originalDelegate?.responds(to: #selector(QMUITextFieldDelegate.textField(_:didPreventTextChangeInRange:replacementString:))) ?? false {
                        originalDelegate?.textField!(textField, didPreventTextChangeInRange: range, replacementString: string)
                    }
                    return false
                }
            }

            if textField.originalDelegate?.responds(to: #function) ?? false {
                return textField.originalDelegate!.textField!(textField, shouldChangeCharactersIn: range, replacementString: string)
            }
