我发布了一个关于模仿地图应用程序的界面的问题,并且刚刚遇到了另一个我不确定UIToolbar和UIBarButtonItem的地方。
在地图应用程序中,有两个按钮似乎没有在UIBarButtonItem documentation中定义任何常量
在应用程序的左下角是“位置”图标,单击“方向”时还有另一个“切换路线”图标,这两个图标都没有在UIBarButtonItem.h中定义
我猜这些还没有添加到iOS 4中吧?这是否意味着在创建UIBarButtonItem时,包含此类按钮/图像的唯一方法是使用initWithImage:style:target:action:方法?
这不是问题,虽然找到相似的图片会很痛苦,但我只想确保我不是在重复发明轮子,当我试图包含这些元素时。
此外,我注意到,虽然所有其他UI元素都可以在颜色方面设置样式,但PageCurl按钮项似乎根本不想改变。例如:我可以将所有其他工具栏按钮设置为不同于默认颜色的颜色,但是页面卷曲拒绝更改。也许我遗漏了一些简单的东西?
感谢您的阅读!
发布于 2011-04-07 19:30:27
正确,这里的iOS文档是默认情况下唯一可用的系统图标。你可以放心地假设这个列表之外的任何东西都不存在,如果你想要一些不同的东西,你必须使用你自己的图像:
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;https://stackoverflow.com/questions/5580247
复制相似问题