Is it possible to use the different UITextFields to identify the conditions to execute? For example if the user touches UITextField *tf1 it must access one condition (using a if statement) and if the user touches UITextField *tf2 it must access another condition. I tried using tags doesn’t seem to work. Any suggestions please?
Is it possible to use the different UITextFields to identify the conditions to execute?
Share
Tags are definitely the right solution. Make sure that each of your textfields has its own unique tag, and make sure you cast the sender to a control type in your action method before reading it. I like to define constants for them to make it clear what each control is for. For example, in the header file:
In the code: