I tried the new Customizing API for iOS 5 and have some problems I don`t understand. The way I do it:
UITabBar *tabBar = [rootController tabBar];
if ([tabBar respondsToSelector:@selector(setBackgroundImage:)])
{
[tabBar setBackgroundImage:[UIImage imageNamed:@"tabbar_bg.png"]];
tabBar.selectionIndicatorImage = [UIImage imageNamed:@"over.png"];
tabBar.tintColor = [UIColor colorWithRed:56.0/255.0 green:63.0/255.0 blue:74.0/255.0 alpha:1.0];
tabBar.selectedImageTintColor = [UIColor colorWithRed:94.0/255.0 green:102.0/255.0 blue:114.0/255.0 alpha:1.0];
}
The problem is shown on the image below:

The border ist my Problem… and it only occurs if I try to use it with nice ( 😛 ) colors.. if I try it with white it looks like this:

Do you have any ideas how to fix it?
If you create a subclass of UITabBarItem and implement the methods
You can return whatever images you want from these and they won’t have any styling effects applied.
Technically these are private methods, but you aren’t calling them, you are overriding them, and I’ve seen plenty of apps use this technique without being rejected.
You can also use a category to override these methods for all tabbaritems in your app. A good trick is to just override selectedImage to return image, like this:
That way, all of your tab bar items will use whatever image you supply without applying any effects for the selectedImage, but will still use the default grey styling for the unselectedImage. Note that this means that you supply an image with colours for the tab bar items, not just a mask image as normal.