Iphone – implement touchesBegan for UITextField


Can you catch TextField events when a Touch happens? So far I didn't see the Touch event get registered to TextField. For example,

    * (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

UITouch *touch = [event allTouches] anyObject;

if (touch view == TextFieldView) {
do somthing.....

This a dummy code what I want to implement is I want a method that get fired when user touches the text field for some period.
If yes than how???

Enlighten me on this.

Thnx in advance.

Best Solution

Right-click on UITextField in the IB and link Touch Down event to required IBAction

Related Question