如何检索标准的iPhone tabitem图像?

Blu*_*hin 10 iphone icons tabbar

我想使用标准图标,如搜索,下载,联系人,设置和列表.其中大多数都存在于App Store等应用程序中,但我不知道如何检索它们.

谢谢

phi*_*reo 10

见这里:http: //www.alexcurylo.com/blog/2009/01/03/extracting-sdk-icons/

例如,我们决定在其中一个标签上添加相机图像.因此,我们深入研究了模拟器资源

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library

我们在上面找到了一个看起来像我们想要的东西

/PrivateFrameworks/PhotoLibrary.framework/CameraIcon.png

但等等,这不是那么容易!模拟器SDK中所有涉嫌PNG图像实际上都是Apple的PNG格式的古怪iPhone变体,所以我们必须以某种方式处理它......

[更新:或者,另一方面,使用摄像头相关功能的相机图标实际上可能在Apple的眼中变成了一大堆失败.所以要小心你如何使用这些图标,小孩!]


Ste*_*ton 9

不确定您是否可以在Interface Builder中执行此操作,但您当然可以以编程方式使用"系统"图标,例如:

[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemDownloads tag:0];
Run Code Online (Sandbox Code Playgroud)

还有许多其他图标:

typedef enum {
   UITabBarSystemItemMore,
   UITabBarSystemItemFavorites,
   UITabBarSystemItemFeatured,
   UITabBarSystemItemTopRated,
   UITabBarSystemItemRecents,
   UITabBarSystemItemContacts,
   UITabBarSystemItemHistory,
   UITabBarSystemItemBookmarks,
   UITabBarSystemItemSearch,
   UITabBarSystemItemDownloads,
   UITabBarSystemItemMostRecent,
   UITabBarSystemItemMostViewed,
} UITabBarSystemItem;
Run Code Online (Sandbox Code Playgroud)

如果你想要任何其他人,我想你必须自己画画!