如何使用默认的iOS图像? [英] How to use default iOS images?

查看:138
本文介绍了如何使用默认的iOS图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何在iOS应用程序中使用图像.但是我不知道如何使用开发人员网站中提到的默认图像,例如共享或书签图标.

I know how to use images in iOS application. But I don't know how to use default images like share or bookmark icons which are mention in developer site.

我想使用它们.我需要下载这些图像集还是Xcode中可用的图像?

I want to use them. Do I need to download those set of images or those are available in Xcode?

如果我们必须下载它们,我在哪里可以找到那些图标?

If we have to download them, where I can get those icons?

推荐答案

开发人员没有直接访问这些图像的权限.我的意思是,您不能像这样初始化图像对象:

Developers haven't direct access to these images. I mean that you can't initialise image object like this:

UIImage *image = [UIImage imageNamed:@"name_of_system_image"];

但是您可以使用系统类型显示一些图像.例如,您可以使用提供标准图标的系统类型来初始化UIBarButtonItem:
-(id)initWithBarButtonSystemItem:(UIBarButtonSystemItem)systemItem target:(id)target action:(SEL)action

But you can display some of images by using system types. For example you could init UIBarButtonItem with system types that provides standard icons:
- (id)initWithBarButtonSystemItem:(UIBarButtonSystemItem)systemItem target:(id)target action:(SEL)action

UIBarButtonSystemItem提供了以下类型:

UIBarButtonSystemItemDone, UIBarButtonSystemItemCancel,
UIBarButtonSystemItemEdit,
UIBarButtonSystemItemSave,
UIBarButtonSystemItemAdd,
UIBarButtonSystemItemFlexibleSpace,
UIBarButtonSystemItemFixedSpace,
UIBarButtonSystemItemCompose,
UIBarButtonSystemItemReply,
UIBarButtonSystemItemAction,
UIBarButtonSystemItemOrganize,
UIBarButtonSystemItemBookmarks,
UIBarButtonSystemItemSearch,
UIBarButtonSystemItemRefresh,
UIBarButtonSystemItemStop,
UIBarButtonSystemItemCamera,
UIBarButtonSystemItemTrash,
UIBarButtonSystemItemPlay,
UIBarButtonSystemItemPause,
UIBarButtonSystemItemRewind,
UIBarButtonSystemItemFastForward,
UIBarButtonSystemItemUndo,
UIBarButtonSystemItemRedo,
UIBarButtonSystemItemPageCurl

UIBarButtonSystemItemDone, UIBarButtonSystemItemCancel,
UIBarButtonSystemItemEdit,
UIBarButtonSystemItemSave,
UIBarButtonSystemItemAdd,
UIBarButtonSystemItemFlexibleSpace,
UIBarButtonSystemItemFixedSpace,
UIBarButtonSystemItemCompose,
UIBarButtonSystemItemReply,
UIBarButtonSystemItemAction,
UIBarButtonSystemItemOrganize,
UIBarButtonSystemItemBookmarks,
UIBarButtonSystemItemSearch,
UIBarButtonSystemItemRefresh,
UIBarButtonSystemItemStop,
UIBarButtonSystemItemCamera,
UIBarButtonSystemItemTrash,
UIBarButtonSystemItemPlay,
UIBarButtonSystemItemPause,
UIBarButtonSystemItemRewind,
UIBarButtonSystemItemFastForward,
UIBarButtonSystemItemUndo,
UIBarButtonSystemItemRedo,
UIBarButtonSystemItemPageCurl

这篇关于如何使用默认的iOS图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆