Voloda2
Voloda2

Reputation: 12607

What is the max size of a UITabBarItem image?

What is the max size of a UITabBarItem image?

Upvotes: 2

Views: 9245

Answers (2)

Yanling
Yanling

Reputation: 303

It is not scaled but clipped. So remember to scale the image before using it.

The item’s image. If nil, an image is not displayed. The images displayed on the tab bar are derived from this image. If this image is too large to fit on the tab bar, it is clipped to fit. The size of a tab bar image is typically 30 x 30 points. The alpha values in the source image are used to create the unselected and selected images—opaque values are ignored.

Upvotes: 6

Pacu
Pacu

Reputation: 1985

From apple's UITabBarItem reference:

The item’s image. If nil, an image is not displayed. The images displayed on the tab bar are derived from this image. If this image is too large to fit on the tab bar, it is scaled to fit. The size of an tab bar image is typically 30 x 30 points. The alpha values in the source image are used to create the unselected and selected images—opaque values are ignored.

I hope it helps! good luck!

Upvotes: 16

Related Questions