MarcoCarnevali
MarcoCarnevali

Reputation: 668

tabBar default and custom image aligned

I have a problem with the Apple Tab Bar. I created a tab bar with defaults and customs images. enter image description here

so here ( this is the storyboard) looks quite good but when I run the simulator this happens: enter image description here

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

Answers (1)

Krunal
Krunal

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.

enter image description here

Upvotes: 1

Related Questions