Question

It seems the default iPhone 5 tab view controller's tab images are 30x30 pixels and just have a blue tint to them. Is there anyway to increase the resolution and change the tint color apart from just using my own view controller and making buttons with images backgrounds?

Was it helpful?

Solution

On an iPhone 5, it is best to use tab bar icons of 60x60 pixels as it has a high resolution display. The sizes of various interface elements are listed in the iOS Human Interface Guidelines.

If you want the icons to display larger on the screen, then yes, you will have to subclass UITabBarController.

To change the tab bar tint color create an outlet from your view to your view controller (called myTabBar below), then the tint color can be changed by calling selectedImageTintColor on the outlet:

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.myTabBar.selectedImageTintColor = [UIColor greenColor];
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top