In most cases, the following line will be executed:
[button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
If nothing happens, use either this:
[button setTitleColor:[UIColor blackColor] forState:(UIControlStateSelected | UIControlStateHighlighted | UIControlStateNormal)];
Or this will do the trick:
[button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; [button setTitleColor:[UIColor blackColor] forState:UIControlStateHighlighted]; [button setTitleColor:[UIColor blackColor] forState:UIControlStateSelected];
See the comments below because this answer has been edited / expanded to include two separate lines.
chown source share