Advertisement
ibobah

Edit TabBarItem's Font and text

Apr 5th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for (UIViewController *tab in rootController.viewControllers)
  2. {
  3.     [tab.tabBarItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
  4.                                             [UIColor blackColor], UITextAttributeTextColor,
  5.                                             [NSValue valueWithUIOffset:UIOffsetMake(0,0)], UITextAttributeTextShadowOffset,
  6.                                             [UIFont fontWithName:@"Noteworthy-Light" size:13.0], UITextAttributeFont, nil]
  7.                                   forState:UIControlStateNormal];
  8.     //
  9.     [tab.tabBarItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
  10.                                             [UIColor whiteColor], UITextAttributeTextColor, nil]
  11.                                   forState:UIControlStateSelected];
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement