Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Tabbar Customization

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 488
    Comment on it

    Snippet works all around to customize the tabbar icons & texts display color for selected and unselected state for iOS7

    self.tabbarController.tabBar.tintColor = [UIColor greenColor];
    

    Below code can be used to customize the text look. you can see that if text is selected it will be appearing as DarkGrayColor otherwise LightGrayColor.

     [[UITabBarItem appearance] setTitleTextAttributes:@{NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue-Bold" size:10.0f],
                                                                NSForegroundColorAttributeName : [UIColor darkGrayColor]
                                                                } forState:UIControlStateSelected];
    
    
            // doing this results in an easier to read unselected state then the default iOS 7 one
            [[UITabBarItem appearance] setTitleTextAttributes:@{NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue-Bold" size:10.0f],
                                                                NSForegroundColorAttributeName : [UIColor lightGrayColor]
                                                                } forState:UIControlStateNormal];
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: