I have a UITextField which I am adding programmatically.
I want to set the touch down event of that UITextField, that is when user clicks on the textfield second time it should resign from being first responder. THat means the key board should disappear.
I have a UITextField which I am adding programmatically. I want to set the
Share
UITextField inherits from UIControl, so you should be able to do what you want by implementing touchesBegan: and checking to see if the UITextField is already firstResponder. If it is, just send a resignFirstResponder message to the UITextField object.