Im trying to create a custom UITabbar using images for the selected and unselected states.html
this is my code:ios
if([UIImage instancesRespondToSelector:@selector(imageWithRenderingMode:)]){ tab_01_on_image =[[UIImage imageNamed:@"Tabbar_on_01"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; tab_01_off_image =[[UIImage imageNamed:@"Tabbar_off_01"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];}else{ tab_01_on_image =[UIImage imageNamed:@"Tabbar_on_01"]; tab_01_off_image =[UIImage imageNamed:N@"Tabbar_off_01"];}[[[self.tabBarController.tabBar items] objectAtIndex:index] setFinishedSelectedImage:tab_01_on_image withFinishedUnselectedImage:tab_01_off_image];
This image shows the problem, the red color is the gap:app
EDIT to add the code to create the UITabbariphone
self.tabBarController =[[BaseTabbarController alloc] init];self.tabBarController.delegate=self;self.tabBarController.viewControllers =@[navControll1, navControll2, navControll3, navControll4, navControll5];self.window.rootViewController =self.tabBarController;
I appreciate any help you guys can offeride