Maximize Size of UITabBarItem image

Viewed 6133

I would like to create a custom UITabBarItem with a Icon-image thats size is a little bit bigger than usual. The thing is I don't want to use a full replace of the background image because i would like to have the translucent effect of the TabBar.

So i would like to know 2 things:

  1. What sizes are now correct for the new iOS7 UITabBarItems and their icons

  2. How do I modify the size of the icon to display a bigger icon, because i dont want to show a title. Without the title its kinda small. In mind to keep the translucent effect displaying.

Any help or suggestions would be great!

3 Answers

Swift 4.2,

let array = tabBarController?.tabBar.items
for controller in array! {
    controller.tabBarItem.imageInsets = UIEdgeInsets(top: 5, left: -5, bottom: -5, right: -5)
}
Related