
Hi,
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.
Thanks

Hi,
You have to set the color of the button for a particular state say: forSelected.
Use the following code:
[myButtonsetTitleColor:[UIColor redColor] forState:UIControlStateNormal];
Thanks

Hi,
There is space between myButton setTitleColor.
Here is corrected code:
[myButton setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.