在UIButton中使用UIBarButtonItem图标

在UIButton中使用UIBarButtonItem图标

本文介绍了在UIButton中使用UIBarButtonItem图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

UIBarButtonItem 有多个可用图标。是否可以使用将其标识符设置为垃圾箱后出现的图标:

UIBarButtonItem has multiple icons available. Is it possible to use the icon which appears after setting its identifier to 'trash':

是否带有 UIButton ?没有像设置标识符样式这样的直接方法。

with an UIButton? There is no straighforward method to do that like setting the identifier or style.

推荐答案

从网络上的某处下载图像,将其添加到您的项目中并设置 UIButton 的图像复制到您刚刚下载的图像。

Download the image from somewhere on the web, add it to your project and set the UIButton's image to the image you just downloaded.

我没有找到与Apple正在使用的相同的图像,但发现了。只需在Pixelmator或Photoshop中更改其颜色即可。

I did not find the same as Apple is using but I found this one. Simply change it's color in Pixelmator or Photoshop.

这篇关于在UIButton中使用UIBarButtonItem图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 05:22