[英]How can I use UIBarButtonSystemItem icons for UITabBar ButtonItem?
It looks like the systemItem
property doesn't exist on the viewController.tabBarItem
is there a way to set UIBarButtonSystemItem
as an image for a UITabBarItem
programmatically? 它看起来像systemItem
财产上不存在viewController.tabBarItem
有没有一种方法来设置UIBarButtonSystemItem
作为一个图像UITabBarItem
编程?
Thanks 谢谢
You can't use UIBarButtonSystemItem
icons with a UITabBarItem
. 您不能将UIBarButtonSystemItem
图标与UITabBarItem
一起使用。 Instead, use UITabBarSystemItem
icons. 而是使用UITabBarSystemItem
图标。
let barItem = UITabBarItem(tabBarSystemItem: .bookmarks, tag: 1) // or whatever item you want
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.