I have a UITabBar with 4 tabs. 3/4 tabs have a title and an image. I'd like to show only an image in the first tab. It works on simulator good, but on iPhone it looks like the screenshot. It crops at the bottom. Icon sizes: 46x42 for 2,3 and 4th icons (retina size), and 92x80 for the 1st icon for retina size.
The screenshot
The code
_tabBarController = [[UITabBarController alloc]init];
_tabBarController.delegate=self;
_firstNavigationController = [[TypeCollectionViewController alloc] initWithNibName:@"TypeCollectionViewController" bundle:nil];
_firstNavigationController.title = @"first";
firstNavigationController.tabBarItem.imageInsets = UIEdgeInsetsMake(5, 0, -5, 0);
NSArray *controllers = [NSArray arrayWithObjects: firstNavigationController, secondNavigationController, thirdNavigationController, fNavigationController, nil];
_tabBarController.viewControllers = controllers;
[[[_tabBarController.tabBar items] objectAtIndex:0] setImage:[UIImage imageNamed:@"first-icon.png"]];
[[[_tabBarController.tabBar items] objectAtIndex:1] setImage:[UIImage imageNamed:@"second-icon.png"]];
[[[_tabBarController.tabBar items] objectAtIndex:2] setImage:[UIImage imageNamed:@"third-icon.png"]];
[[[_tabBarController.tabBar items] objectAtIndex:3] setImage:[UIImage imageNamed:@"f-icon.png"]];
[_tabBarController setSelectedIndex:0];
[self.window setRootViewController:_tabBarController];
[[[_tabBarController.tabBar items] objectAtIndex:0] setTitle:nil];
[self.window makeKeyAndVisible];
How to fix this issue? Thanks in advance.