I am trying to set a custom background image on my tabbar. I have image named “tabbarBack.png”, with size of 640×92. In my code I am setting it like this.
[[[self tabBarController] tabBar] setBackgroundImage:[UIImage imageNamed:@"tabbarBack.png"]];
When I test it on device the tabbar is twice bigger than it should be?
Any help?
Kind regards
NSAddict’s comment: Rename your image to tabbarBack@2x.png. This is called pixel doubling for the Retina Display.
Without the @2x iOS doesn’t know that it should apply a scale factor and it will be used as it is and though it should be halved.
So a hack is:
In reality there should be
so you say only