我关注了这个线程:https://codesandbox.io/s/6vx0m346z
在显示时,我的图像尺寸仍然错误:
TabBarItems and setting their image sizes?
我什至尝试根据该线程以编程方式更改大小:
let myInsets : UIEdgeInsets = UIEdgeInsetsMake(3, 3, 3, 3)
destination.tabBar.items![3].image = #imageLiteral(resourceName: "MY_PROFILE_IMG").resizableImage(withCapInsets: myInsets)
而且还是一样。
有人可以指导我解决这个问题吗?
注意:我以编程方式添加了图像:
destination.tabBar.items![2].title = LocalizationStrings.TabBar.MY_WAPOS_TEXT
destination.tabBar.items![2].image = #imageLiteral(resourceName: "MY_PROFILE_IMG")