I have a ViewController with an UIButton inside. When I clicked, the text on the button disappeared. I add all the setTitle for all states, but it continues disappearing. An
I noticed a peculiar thing. If I set the title using
bttn.titleLabel.textColor = [UIColor purpleColor];
Then as soon as I click the button, the title disappears. But, if I use the following method :
[bttn setTitleColor:[UIColor purpleColor] forState:UIControlStateNormal];
Then everything is working correctly.