         
         var animationType : animationType = .unknown
         
-        if (count >= self.maxLength) {
+        if (count >= maxLength) {
             animationType = .didReachLimit
-        } else if (count <= self.maxLength) {
+        } else if (count <= maxLength) {
             animationType = .basic
         }
         

        
        switch type {
        case .basic:
            self.animateCounterLabelColor(color: self.counterColor)
            break
        case .didReachLimit:
            self.animateCounterLabelColor(color: self.limitColor)
            
            if (self.animate) {
                self.counterLabel.shakeTo(transform: CGAffineTransform(translationX: 5, y: 0), duration: 0.3)
            }
            
            break

        return max > 0
    }
    
    private func setupCounterLabel() -> UILabel {
        
        let fontFrame : CGRect = CGRect(x: 0, y: 0, width: getCounterLabelWidth(), height: Int(frame.height))
        let label : UILabel = UILabel(frame: fontFrame)
        
        if let currentFont : UIFont = font {
            label.font = currentFont
            label.textColor = counterColor
            label.textAlignment = .left
            label.lineBreakMode = .byWordWrapping
            label.numberOfLines = 1
