Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6902291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:46:48+00:00 2026-05-27T07:46:48+00:00

with more appearance control in iOS 5, how do we change the UITabBarItem text

  • 0

with more appearance control in iOS 5, how do we change the UITabBarItem text color ? from default white to other color ?

EDIT:working solution

  [[UITabBarItem appearance] setTitleTextAttributes:
         [NSDictionary dictionaryWithObjectsAndKeys:
          [UIColor blackColor], UITextAttributeTextColor, 
          [UIColor whiteColor], UITextAttributeTextShadowColor, 
          [NSValue valueWithUIOffset:UIOffsetMake(0, 1)], UITextAttributeTextShadowOffset, 
          [UIFont fontWithName:@"Rok" size:0.0], UITextAttributeFont, 
          nil] 
                                              forState:UIControlStateNormal];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:46:49+00:00Added an answer on May 27, 2026 at 7:46 am

    Do you mean this one? Keep in mind, this only works for iOS5.0 or later.

    if ([self.tabBarItem respondsToSelector:@selector(setTitleTextAttributes:)]) {
        NSLog(@"*** Support method(iOS 5): setTitleTextAttributes:");
        [self.tabBarItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
                                                    [UIFont fontWithName:@"AmericanTypewriter" size:20.0f], UITextAttributeFont,
                                                    [UIColor blackColor], UITextAttributeTextColor,
                                                    [UIColor grayColor], UITextAttributeTextShadowColor,
                                                    [NSValue valueWithUIOffset:UIOffsetMake(0.0f, 1.0f)], UITextAttributeTextShadowOffset,
                                                    nil]];
    }
    

    Apple’s documentation on customizing appearance:

    In iOS v5.0 and later, you can customize the appearance of tab bars by setting item label text attributes using appearance selectors declared by UIBarItem. You can also use the methods listed in “Customizing Appearance.” You can customize the appearance of all segmented controls using the appearance proxy (for example, [UITabBarItem appearance]), or just of a single tab bar. You can also provide finished selected and unselected images using the methods listed in “Managing the Finished Selected Image”; these methods, though, do not participate in the UIAppearance proxy API (see UIAppearance). UIKit does now provide any automatic treatment to finished images. For good results, you must provide finished selected and unselected images in matching pairs using setFinishedSelectedImage:withFinishedUnselectedImage:.

    Edit:
    Here is another example using the UIAppearance system and the NSDictionary literal syntax:

    [[UITabBarItem appearance] setTitleTextAttributes:@{
                             UITextAttributeFont : [UIFont fontWithName:@"AmericanTypewriter" size:20.0f],
                        UITextAttributeTextColor : [UIColor blackColor],
                  UITextAttributeTextShadowColor : [UIColor grayColor],
                 UITextAttributeTextShadowOffset : [NSValue valueWithUIOffset:UIOffsetMake(0.0f, 1.0f)]}];
    

    Edit (by @JeremyWiebe):
    As of iOS 6, the dictionary keys have been changed to be the same as OS X uses:

    NSShadow *shadow = [[NSShadow alloc] init];
    shadow.shadowColor = [UIColor grayColor];
    shadow.shadowOffset = CGSizeMake(0, 1.0);
    
    [[UITabBarItem appearance] setTitleTextAttributes:@{
                             NSFontAttributeName : [UIFont fontWithName:@"AmericanTypewriter" size:20.0f],
                  NSForegroundColorAttributeName : [UIColor blackColor],
                           NSShadowAttributeName : shadow }];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

More information from the Perl 6 Wikipedia entry Junctions Perl 6 introduces the concept
Situation with Thai text on a client site is that we can't control where
I've got a Compact Framework (3.5) control and I'd like it have a default
Can I change the appearance of a Winforms ComboBox so that a Combobox with
I have three main things I want to change with the appearance of a
How to create a multi line property with edit box? I need one more
More than once I've lost work by accidentally killing a temporary buffer in Emacs.
More out of interest than anything else, but can you compile a DirectX app
More than about LINQ to [insert your favorite provider here], this question is about
More detail to my question: HTML and JavaScript are called client-side code. C# and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.