gpt4 book ai didi

iphone - UIBarButtonSystemItem 枚举 - 缺少图标?

转载 作者:行者123 更新时间:2023-11-29 13:49:36 24 4
gpt4 key购买 nike

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

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

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

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

这不是问题,虽然找到相似的图像会很痛苦,但我只是想确保我在尝试包含此类元素时没有重新发明轮子。

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

感谢阅读!

最佳答案

正确,这里是 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;

关于iphone - UIBarButtonSystemItem 枚举 - 缺少图标?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5580247/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com