I know I’m overlooking something easy, but I am using
if (textField == self.nameTextField || textField == self.ageTextField || textField == ...)
when ideally I’d like to use something that allows the textField to be compared to an array of allowed (named) textField objects.
I’ve tried to pseudocode what I think the solution would look like a couple of times, I just don’t know what I’m doing. Can anyone point me in the right direction?
Just check like:
Here
textFieldArrayis thearraywhich holds alltextFields.If the
textFieldobject is in thetextFieldArray, it’ll returntrue.