Muhammad Hewedy
Muhammad Hewedy

Reputation: 30058

How to create image contains a text for UITabBarItem

I am trying to put an image that contains a text on UITabBarItem.

I went to our Graphics designer and asked him to create an image for me that contains a text "Summary".

He actually did. ( a png image).. but when I put inside the app, I saw a horrible look..

The Image: enter image description here

How it look in the app: enter image description here

Upvotes: 0

Views: 230

Answers (2)

yuvalz
yuvalz

Reputation: 175

It is absolutely possible for you to use custom colors and images instead of the ones provided to you by Apple's own UITabBarController. I used the code explained in this (really thorough) tutorial - works great.

Upvotes: 0

Ole Begemann
Ole Begemann

Reputation: 135548

To create an image for a tab bar or toolbar item, you or your designer must work in the image's alpha channel. The colors in the image don't matter at all, the OS only is interested in the alpha channel. In your case, the background of your image should be fully transparent instead of black.

Upvotes: 1

Related Questions