I want to display only title for tabbar item without image. Is it possible? When I tried setting
let tabItem = UITabBarItem()
tabItem.title = "Tab1"
tabItem.selectedImage = nil
tabItem.image = nil
tabViewController?.tabBarItem = tabItem
I'm just getting a blank space which is tapable, but no title or image.
simplest way is remove the images from the tab bar and set the custom offset vertical.as shown in the image. or else follow the link that TJ3n priveded remove the images in the UITabBarItem and aligned vertically the title.

In case you want it to be done programmatically:
tabItem.titlePositionAdjustment = UIOffset(horizontal: 0, vertical: -16)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With