I am calling an action from textFieldDidBeginEditing as follows:
[dotButton addTarget:self action:@selector(actionButton:) forControlEvents:UIControlEventTouchUpInside];
and specifiying my action as:
- (void) actionButton:(id)sender {
textField.text = [textField.text stringByAppendingString:@"APPROVED"];
}
Simple question with hopefully a simple answer….
textField.text refers to the field named textField but how do I update the current field that textFieldDidBeginEditing is acting on at the time?? i.e can I set a variable to retrieve the current fieldname?
Thanks
You should check whether or not the textField the label of your interest.
An example:
The textField variable that is passed from the delegate method is the one that you should handle.
Tell me if it works. Good luck!