我只想显示没有图像的标签栏项目的标题。可能吗?当我尝试设置
let tabItem = UITabBarItem()
tabItem.title = "Tab1"
tabItem.selectedImage = nil
tabItem.image = nil
tabViewController?.tabBarItem = tabItem
我只是得到一个可点击的空白区域,但没有标题或图像。
最佳答案
最简单的方法是从选项卡栏中删除图像并设置自定义垂直偏移量。如图所示。或者点击 TJ3n prived remove the images in the UITabBarItem and aligned vertically the title 的链接.
关于ios - UITabBarItem 只显示没有图像的文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42974166/