You should play with imageInsets
property of UITabBarItem
. Here is sample code:
let tabBarItem = UITabBarItem(title: nil, image: UIImage(named: "more")
tabBarItem.imageInsets = UIEdgeInsets(top: 9, left: 0, bottom: -9, right: 0)
Values inside UIEdgeInsets
depend on your image size. Here is the result of that code in my app:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…