I’ve created a tab bar application. I have four tabs; on the selected tab, I need to set the color red for tab title. How can i do that?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If I understand your question correctly, you want to customize the color of the text on the
UITabBarItems. Unfortunately, it’s really not that flexible. If you’re intent on doing this (which, unless you’ve carefully considered the design with the help of a professional, I recommend against!), you’ll have to do some really frightening things to get this to work.I’d suggest iterating through the subviews of the
UITabBar(as many levels as necessary), and looking forUILabelobjects. If you find some, you can change their color. If you don’t, that means that it is implemented differently (probably in a-drawRect:method somewhere); if this happens to be the case, you really ought to give up.Best of luck on whatever you decide to do.