Azhar Azhar - 1 year ago 138
Objective-C Question

How to get UITextField Tap Event?

I am trying to show UIAlertView on Tap or Click of UITextField for both IPad and IPhone. I make an IBAction and Attach it with Tap Down event of UITextField.

But its not working correctly, means not always, in case of iphone and not working in-case of iPad

- (IBAction) TopuchState
//function code

please help How could I do this.

enter image description here

Answer Source

Try adding a target for when a particular text field begins editing (UIControlEventEditingDidBegin):

 [textField1 addTarget:delegate action:@selector(textField1Active:) forControlEvents:UIControlEventEditingDidBegin];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download