Robert J. Clegg
Robert J. Clegg

Reputation: 7360

iOS7 Tabbar icons too big

Seems I am having difficulty with something as simple as icons.

I am building an app for iOS7 only and thus, devices are retina displays (excluding iPad 2). So I made up some 60 x 60 icons for my tabbar. However these are just too big. And 30 x 30 is a little pixelated.

Here is what a 60 x 60 icon looks like:

enter image description here

Can someone tell me why this is happening?

Upvotes: 10

Views: 7168

Answers (2)

user3258468
user3258468

Reputation: 354

Or you can do something like this:

UIImage *image = [UIImage imageNamed:@"1.jpg"];

[image drawInRect:CGRectMake(0, 0, 30, 30)];

first.tabBarItem.image = image;

Upvotes: 0

Yas Tabasam
Yas Tabasam

Reputation: 10615

Keep 60x60px icons but rename them as [email protected] which iOS will automatically reduce to 30x30 points, roughly to half of the original size on retina devices.

If you are using assets catalogue, please make sure your icons are set to 2x icon sets.

Upvotes: 25

Related Questions