0

I have a custom UITextField with a rightView containing a custom UIView with a draw rect (arrow) image. How can I get the leftView fire the same action as the textfield?

@implementation CustomDropDownTextField

-(id)initWithCoder:(NSCoder *)aDecoder {
    if(self = [super initWithCoder:aDecoder]) {

        // Border Color of the UITextField - light gray
        self.delegate = self;
        self.layer.borderColor = [[UIColor colorWithRed: 0.827 green: 0.827 blue: 0.827 alpha: 1] CGColor];;
        self.layer.borderWidth= 1.0f;

        self.rightView = [CustomDateDropDownArrowView default];
        self.rightViewMode = UITextFieldViewModeAlways;
    }
    return self;
}
@end

I have this custom textField with a custom UIView as the righView. I just want to fire didBeginEditing even if the user clicks on its rightView.

Thanks in advance.

Moonstar
  • 247
  • 1
  • 4
  • 13

0 Answers0