简体   繁体   English

按钮图标:圆形关闭图标

[英]Button icons: round close icon

I've seen other apps are using a round icon for closing a view. 我见过其他应用正在使用圆形图标关闭视图。 The only similar icon I found is UIBarButtonSystemItemStop . 我发现的唯一类似图标是UIBarButtonSystemItemStop But this presents only a rotated cross with a border (as always with buttons) around it. 但这只会在旋转的十字架周围带有边框(与按钮一样)。

I rather would like have something like a UIButtonTypeInfoLight . 我宁愿有类似UIButtonTypeInfoLight东西。 If this button is used, no border is visible. 如果使用此按钮,则没有边框可见。 Also the icon is a round grey icon with a symbol (here i symbol) in it. 该图标也是带有符号(在此为i符号)的圆形灰色图标。 Are there further icons in this style available? 是否有这种风格的其他图标可用? Neither UIBarButtonSystemItem nor UIButtonType is offering that. UIBarButtonSystemItemUIButtonType都不提供该功能。

I have also seen a thunderbolt icon in the style of UIButtonTypeInfoLight . 我还看到了UIButtonTypeInfoLight样式的雷电图标。 Are these icons self made? 这些图标是自制的吗? If yes, how are they included so that no border is visible? 如果是,如何包括它们,以使边框不可见?

These buttons are custom. 这些按钮是自定义的。

You can embed any custom view into bar using [UIBarButtonItem initWithCustomView:] . 您可以使用[UIBarButtonItem initWithCustomView:]将任何自定义视图嵌入到栏中。

You can use UIButton with UIButtonTypeCustom type so that you have button with no border. 您可以将UIButtonUIButtonTypeCustom类型一起使用,以使按钮具有无边框。 Also set showsTouchWhenHighlighted to YES so that button glows like info button. showsTouchWhenHighlighted设置为YES使按钮像信息按钮一样发光。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM