How can I change UIButton title color?
I have a button in my iPhone/iPad application. I want to change the color of the text when user clicks on it making it selected.
Provide me good example code.
January 2, 2011 at 2:30 PM
You have to set the color of the button for a particular state say:
Use the following code:
[myButtonsetTitleColor:[UIColor redColor] forState:UIControlStateNormal];
January 2, 2011 at 2:31 PM
There is space between
Here is corrected code:
[myButton setTitleColor:[UIColor redColor] forState:UIControlStateNormal];