I created a tabBar and set the image in it, but it leaves too much space below the tabBarItem . How can i remove this?
This is my tabBar than display now

And I want to display it like this

To display a tab
firstVC = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil]; secondVC = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil]; thirdVC = [[ThirdViewController alloc] initWithNibName:@"ThirdViewController" bundle:nil]; forthVC = [[ForthViewController alloc] initWithNibName:@"ForthViewController" bundle:nil]; [[UITabBar appearance] setTintColor:[UIColor whiteColor]]; NSArray *viewControllersArray = [[NSArray alloc] initWithObjects:firstVC,secondVC,thirdVC,forthVC, nil]; self.tabController = [[UITabBarController alloc] init]; [self.tabController setViewControllers:viewControllersArray animated:NO]; [self.window addSubview:self.tabController.view];
For the tabBar background image, I used this code
UIImage* tabBarBackground = [UIImage imageNamed:@"tabbarimg1.png"]; [[UITabBar appearance] setBackgroundImage:tabBarBackground];
And for setting imge in the element I used this code
//used to set the tabBarItem images [self.tabBarItem setFinishedSelectedImage:[UIImage imageNamed:@"home_tab"] withFinishedUnselectedImage:[UIImage imageNamed:@"home_tab"]]; //Set the badge on tabBarItem [self.tabBarItem setBadgeValue:@"15"];
ios iphone uitabbaritem tabbar
user2452016
source share