F.SO7 F.SO7 - 2 years ago 92
iOS Question

Align UITabBarItem image to the left and to the right

I have a

UITabBar
with 3 items.

Each item has just an image (without a text).

What happens now is that all of the three images are presented in the center of each `tabBarItem.

What I want to accomplish is that the left
UITabBarItem
's image will be aligned to the left. The middle
UITabBarItem
's image will stay in the center, and the right
UITabBarItem
will be aligned to the right.

I've searched all over the internet a way, but
UITabBarItem
doesn't have any
alignImage
property or something like that.

Any idea how can I do that?

Thank you!

Answer Source

enter image description here

Set image inset of tab bar item like this

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download