I have an array of UITextField objects called _fields . I want to be able to immediately tell them everything, to set them as highlighted , and then do the same to turn this highlighted property into NO . This piece of code works.
[fields makeObjectsPerformSelector:@selector(setHighlighted:) withObject:@YES];
This part, however, does not work; I can’t get him to do anything.
[fields makeObjectsPerformSelector:@selector(setHighlighted:) withObject:@NO];
It really works.
for (UITextField *field in fields) { field.highlighted = NO; }
What gives? I would love to use the message makeObjectsPerformSelector:withObject: but I don't really like using @NO . Can someone explain this behavior to me or say that I am doing something wrong?
source share