UIButton textColor for UIControlStateHighlighted in iOS8 issue

160 Views Asked by At

I always set the UIColor of highlighted UIButton with:

[button setTitleColor:[UIColor greenColor] forState:UIControlStateHighlighted];

But in iOS8 it doesn't work for me (and setting the UIColor in storyboard doesn't work too).

But this code works fine for iOS7.

1

There are 1 best solutions below

0
On BEST ANSWER

Did you have the button on system style? Try change the button type to custom in Identity Inspector.