I have three textfields in interface builder being used to accept input. When a button is pushed the data in the 3 fields are processed. Currently, when one of the textfields sends out a textFieldShouldReturn (or similar) message to its delegate, I assign the "sender" parameter (using the tag property) to the delegate's respective UITextField instance variable.
I run into a problem if the button is pushed, but the user has taken no action inside the textfield, essentially leaving the delegate's UITextFields as nil. A simple work around is to just check for nil and assume that nil means an empty textfield, but I'm sure there is a more appropriate pattern within this context to achieve the same goal.
Essentially, how do I assign IB textfields to the delegate UITextField properties without the user taking some action to invoke the delegate?