My app has tab bar. I'm trying to customize the tab bar item by changing it's image. I created an image with size 106x49. The image is being placed using this code:
((UITabBarItem*)[self.tabBarController.tabBar.items objectAtIndex:0]).image = [[UIImage imageNamed:@"TabBarItemNow"] imageWithRenderingMode:UIImageResizingModeOriginal];
[((UITabBarItem*)[self.tabBarController.tabBar.items objectAtIndex:0]) setTitle:nil];
When i run the app, the tab bar item image looks like this:
Is there a way to fix this? Am i choosing the right image dimensions for the bar item? Besides, the image looks pixelated when it's presented. I tried it with a larger image, it also go beyond the tab bar.