Question

I have a custom button in ABNewPersonViewController. I need to enable the button, only if any(at least) one of the fields in ABNewPersonViewController is edited. Is there any way in which I can check this condition, other than writing code to check all fields independently.

Was it helpful?

Solution

You'll need some code somewhere to do this, but I'd do it by coding the existing event listener on each field to enable the button when the field being listened to is edited.

OTHER TIPS

All controls have events so you can link your code to it. Example: UITextField has the event Editing Did Begin. Every controls can be linked to the same IBAction and you can recognize wich control the user changed by checking the sender param.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top