I have a small gui app that consists selectable groups, each groups has a disclosure button to display its sub-group, an image and a text field. When you are editting a text field and select another group or another text field I want to end editting on the old text field. Also, I only want the background of a text field to be display when it is being editted.
I am trying to accomplish this by adding a call to activate the background in becomeFirstResponder and deactivate in textDidEndEditting. I ended up putting the call to deactivate in textDidEndEditting instead of resignFirstResponder because it seems that when I select the textField it calls resignFirstResponder right after becomeFirstResponder. I am wondering is this normal behavior or is this a sign of some other problem with my code? If this is normal behavior is there a better place to put the call to deactivate that background because having it in textDidEndEditting in problematic.