         return self.textRectForBounds(bounds)
     } //F.E.
     
+    public func textFieldShouldBeginEditing(textField: UITextField) -> Bool {
+        return _delegate?.textFieldShouldBeginEditing?(textField) ?? true;
+    } //F.E.
+    
+    public func textFieldDidBeginEditing(textField: UITextField) {
+        _delegate?.textFieldDidBeginEditing?(textField);
+    } //F.E.
+    
+    public func textFieldShouldEndEditing(textField: UITextField) -> Bool {
+        return _delegate?.textFieldShouldEndEditing?(textField) ?? true;
+    } //F.E.
+    
+    public func textFieldDidEndEditing(textField: UITextField) {
+        _delegate?.textFieldDidEndEditing?(textField);
+    } //F.E.
+    
+    public func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool {
+        
+        let rtn = _delegate?.textField?(textField, shouldChangeCharactersInRange:range, replacementString:string) ?? true;
+        
+        //IF CHARACTERS-LIMIT <= ZERO, MEANS NO RESTRICTIONS ARE APPLIED
+        if (self.maxCharLimit <= 0) {
+            return rtn;
+        }
+        
+        guard let text = textField.text else { return true }
+        
+        let newLength = text.utf16.count + string.utf16.count - range.length
+        return (newLength <= self.maxCharLimit) && rtn // Bool
+    } //F.E.
+    
+    public func textFieldShouldClear(textField: UITextField) -> Bool {
+        return _delegate?.textFieldShouldClear?(textField) ?? true;
+    } //F.E.
+    
+    public func textFieldShouldReturn(textField: UITextField) -> Bool {
+        return _delegate?.textFieldShouldReturn?(textField) ?? true;
+    } //F.E.
+    
 } //CLS END


import UIKit

public class BaseUITextField: UITextField, BaseView {
   
    @IBInspectable public var bgColorStyle:String! = nil;
    

                    self.attributedPlaceholder = NSAttributedString(string:plcHolder, attributes: [NSForegroundColorAttributeName: SyncedColors.color(forKey: colorStyl)!]);
                }
            }
        }
    } //P.E.
    
    
    private var _maxCharLimit: Int = 50;
    @IBInspectable public var maxCharLimit: Int {
        get {
            return _maxCharLimit;
        }
        
        set {
            if (_maxCharLimit != newValue)
            {_maxCharLimit = newValue;}
        }
    } //P.E.
    
