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?
Thanks
You can't use UIBarButtonSystemItem
icons with a UITabBarItem
. Instead, use UITabBarSystemItem
icons.
let barItem = UITabBarItem(tabBarSystemItem: .bookmarks, tag: 1) // or whatever item you want
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.