首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >UIBarButtonSystemItem枚举-缺少图标?

UIBarButtonSystemItem枚举-缺少图标?
EN

Stack Overflow用户
提问于 2011-04-07 19:24:08
回答 1查看 3K关注 0票数 1

我发布了一个关于模仿地图应用程序的界面的问题,并且刚刚遇到了另一个我不确定UIToolbar和UIBarButtonItem的地方。

在地图应用程序中,有两个按钮似乎没有在UIBarButtonItem documentation中定义任何常量

在应用程序的左下角是“位置”图标,单击“方向”时还有另一个“切换路线”图标,这两个图标都没有在UIBarButtonItem.h中定义

我猜这些还没有添加到iOS 4中吧?这是否意味着在创建UIBarButtonItem时,包含此类按钮/图像的唯一方法是使用initWithImage:style:target:action:方法?

这不是问题,虽然找到相似的图片会很痛苦,但我只想确保我不是在重复发明轮子,当我试图包含这些元素时。

此外,我注意到,虽然所有其他UI元素都可以在颜色方面设置样式,但PageCurl按钮项似乎根本不想改变。例如:我可以将所有其他工具栏按钮设置为不同于默认颜色的颜色,但是页面卷曲拒绝更改。也许我遗漏了一些简单的东西?

感谢您的阅读!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-04-07 19:30:27

正确,这里的iOS文档是默认情况下唯一可用的系统图标。你可以放心地假设这个列表之外的任何东西都不存在,如果你想要一些不同的东西,你必须使用你自己的图像:

代码语言:javascript
复制
typedef enum {
   UIBarButtonSystemItemDone,
   UIBarButtonSystemItemCancel,
   UIBarButtonSystemItemEdit,
   UIBarButtonSystemItemSave,
   UIBarButtonSystemItemAdd,
   UIBarButtonSystemItemFlexibleSpace,
   UIBarButtonSystemItemFixedSpace,
   UIBarButtonSystemItemCompose,
   UIBarButtonSystemItemReply,
   UIBarButtonSystemItemAction,
   UIBarButtonSystemItemOrganize,
   UIBarButtonSystemItemBookmarks,
   UIBarButtonSystemItemSearch,
   UIBarButtonSystemItemRefresh,
   UIBarButtonSystemItemStop,
   UIBarButtonSystemItemCamera,
   UIBarButtonSystemItemTrash,
   UIBarButtonSystemItemPlay,
   UIBarButtonSystemItemPause,
   UIBarButtonSystemItemRewind,
   UIBarButtonSystemItemFastForward,
   UIBarButtonSystemItemUndo,        // iOS 3.0 and later
   UIBarButtonSystemItemRedo,        // iOS 3.0 and later
   UIBarButtonSystemItemPageCurl,    // iOS 4.0 and later
} UIBarButtonSystemItem;
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5580247

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档