How to customize UITabBar
Do you like to customize your UITabBar? Since there's iOS5 you could do it! Change backgroundimage, tintcolor, or give an selection indicator image.
In this tutorial you would learn to customize your UITabBar in Xcode.
To customize the UITabBar you must have an referrer to the UITabBarController.
Open your class wich refers to the UITabBarController. Add the code below in your class. E.g. in the viewDidLoad: method.
Customize the UITabBar by setting the backgroundimage of your UITabBar.
UIImage *tabBackground = [[UIImage imageNamed:@"tabBarBackground.jpg"]
resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
// Set background for all UITabBars
[[UITabBar appearance] setBackgroundImage:tabBackground];
// Set background for only this UITabBar
[[tabBarController tabBar] setBackgroundImage:tabBackground];Customize the UITabBar by setting the tintColor for the images.
// Set tint color for the images only for this tabbar
[[tabBarController tabBar] setSelectedImageTintColor:[UIColor brownColor]];
[[tabBarController tabBar] setTintColor:[UIColor whiteColor]];
// Set tint color for the images for all tabbars
[[UITabBar appearance] setSelectedImageTintColor:[UIColor brownColor]];
[[UITabBar appearance] setTintColor:[UIColor whiteColor]];Customize the UITabBar by setting the selectionIndicatorImage.
// Set selectionIndicatorImage for this tabbar
[[tabBarController tabBar] setSelectionIndicatorImage:[UIImage imageNamed:@"selectedtab.png"]];
// Set selectionIndicatorImage for all tabbars
[[UITabBar appearance] setSelectionIndicatorImage:[UIImage imageNamed:@"selectedtab.png"]];Now you've an full customized UITabBar!

