ios 如何在Xcode中获取所有系统图标
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/37832587/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to get all the system icons in Xcode
提问by user1503606
I want to be able to use the camera switch icon that is listed here not the plain one the switch one. https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/BarIcons.html
我希望能够使用此处列出的相机开关图标,而不是普通的开关图标。 https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/BarIcons.html
But in Xcode under my bar button item it does not seem to be listed?
I understand I am probably missing something blatantly obvious. Can anyone help with this?
我知道我可能遗漏了一些显而易见的东西。有人能帮忙吗?
回答by loretoparisi
We are talking about thislike
我们谈论的是这个样
Your aim is to grab the 1x and 2x icons? There are several online resources (free and paid), but I assume your aim is to get those icons from the device directly in some way.
您的目标是获取 1x 和 2x 图标?有几个在线资源(免费和付费),但我认为您的目标是以某种方式直接从设备获取这些图标。
Those are the ones coming from the UITabBarItem
init with TabBarSystemItem
这些是来自UITabBarItem
init 的那些TabBarSystemItem
self.tabBarItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemFavorites tag:0]
If you are going to extract all of them, see hereto have an idea.
如果您要提取所有这些,请参阅此处以获取想法。
If you want just to list them, taking a look at the headers you will find
如果您只想列出它们,请查看您会发现的标题
typedef enum {
UITabBarSystemItemMore,
UITabBarSystemItemFavorites,
UITabBarSystemItemFeatured,
UITabBarSystemItemTopRated,
UITabBarSystemItemRecents,
UITabBarSystemItemContacts,
UITabBarSystemItemHistory,
UITabBarSystemItemBookmarks,
UITabBarSystemItemSearch,
UITabBarSystemItemDownloads,
UITabBarSystemItemMostRecent,
UITabBarSystemItemMostViewed,
} UITabBarSystemItem;