我可以在我的应用程序的其他资产中使用 Apple 提供的默认 UIBarButton 图标吗?

Can I use the default UIBarButton icons provided by Apple in other assets of my app?

比如 UIButton 或 UIImageView 等。

如果是这样,我该如何使用 StoryBoard 或 Xib

我可以在 UIBarButton 项目中使用默认图标,但无法在普通按钮中查找它们。使用 Storyboard 的解决方案会非常好

为了使用它们,您需要提取它们 使用一个方便的小应用程序(足够合适)iOS Artwork Extractor。当我想模仿 iOS 系统行为时,我一直使用它。

在以下位置下载 Xcode 项目:

https://github.com/0xced/iOS-Artwork-Extractor

或者换一种方式:

Other.artwork文件在/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/UIKit.framework/(需要SDK).

使用 "iPhoneShop-1.3.jar" 程序 -- 当前可用 here 将所有图像提取到一个目录中。

java -jar iPhoneShop-1.3.jar ARTWORK Other.artwork EXPORT Other

不,您不能像 UIButton 一样在其他子视图上使用 UIBarButtonItem。 UIBarButtonItem 只能覆盖 UINavigationBar.