Iphone UIBarButtonSystemItem枚举-缺少图标?
我发布了一个关于模拟地图应用程序界面的问题,刚刚遇到另一个我不确定UIToolbar和uibarbuttoneim的领域 在“地图”应用程序中,有两个按钮似乎没有在中定义任何常量 在应用程序的左下角是“位置”图标,当单击“方向”时,还有另一个“切换路线”图标,这两个图标都没有在UIBarButtonItem.h中定义 我猜这些还没有添加到iOS 4中?这是否意味着在创建UIBarButtonim时,包含此类按钮/图像的唯一方法是使用initWithImage:style:target:action:method 这不是一个问题,虽然找到类似的图像会很痛苦,但我只是想确保我在尝试包含这些元素时,不会重新发明轮子 另外,我注意到,虽然所有其他UI元素都可以根据颜色进行样式设置,但PageCurl按钮项似乎根本不想更改。Ie:我可以使所有其他工具栏按钮的颜色与默认值不同,但页面卷曲拒绝更改。也许我错过了一些简单的东西Iphone UIBarButtonSystemItem枚举-缺少图标?,iphone,ios,uibarbuttonitem,Iphone,Ios,Uibarbuttonitem,我发布了一个关于模拟地图应用程序界面的问题,刚刚遇到另一个我不确定UIToolbar和uibarbuttoneim的领域 在“地图”应用程序中,有两个按钮似乎没有在中定义任何常量 在应用程序的左下角是“位置”图标,当单击“方向”时,还有另一个“切换路线”图标,这两个图标都没有在UIBarButtonItem.h中定义 我猜这些还没有添加到iOS 4中?这是否意味着在创建UIBarButtonim时,包含此类按钮/图像的唯一方法是使用initWithImage:style:target:actio
谢谢你的阅读 正确,从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;
正确,从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;
谢谢你的回复。我想我的假设是正确的,这改变了我的想法:感谢你的回答。我想我的假设是正确的,这做了一个改变:PUpdate:从iOS 5.0开始,现在MapKit中增加了一个名为MKUserTrackingBarButtonItem的UIBarButtonItem类,它提供了我最初搜索的“位置”和“方向”按钮。希望这能帮助其他正在寻找它的人。更新:从iOS 5.0开始,现在MapKit中增加了一个名为MKUserTrackingBarButtonItem的UIBarButtonItem类,它提供了我最初搜索的“位置”和“方向”按钮。希望这有助于其他任何人谁是寻找这个。