I've got an array of UITextField
objects called _fields
. I want to be able to message them all at once to set them to be highlighted
, and then do the same to turn that highlighted
property to NO
. This part of the code works.
[fields makeObjectsPerformSelector:@selector(setHighlighted:) withObject:@YES];
This part, however, does not; I can't get it to do anything.
[fields makeObjectsPerformSelector:@selector(setHighlighted:) withObject:@NO];
This does work, however.
for (UITextField *field in fields) {
field.highlighted = NO;
}
What gives? I would've liked to have used the makeObjectsPerformSelector:withObject:
message, but I'm not getting much love with @NO
. Can someone explain this behavior to me, or tell me if I'm doing something wrong?