Reputation: 668
I have a problem with the Apple Tab Bar. I created a tab bar with defaults and customs images.
so here ( this is the storyboard) looks quite good but when I run the simulator this happens:
customs images are not aligned centered and I can't find a solution for that. I tried a lot of alignments but nothing seems to work.
Upvotes: 3
Views: 1113
Reputation: 79646
You are getting this problem, because you may be using a high-resolution image, when iOS is looking for a standard resolution image.
iOS automatically selects the appropriate image size for you, depending on the resolution of the accessing device. Set a "Standard Resolution" image, for non-retina devices, and a "High Resolution" image, for retina displays.
Use all custom icons with same square size with size(square with width & height) of 30, 60 90 for 1x, 2x & 3x respectively.
Here Apple document: Tab Bar Icon Size
In portrait orientation, tab bar icons appear above tab titles. In landscape orientation, the icons and titles appear side-by-side. Depending on the device and orientation, the system displays either a regular or compact tab bar. Your app should include custom tab bar icons for both sizes.
Upvotes: 1