How to adjust an UIButton#39;s imageSize?(如何调整 UIButton 的 imageSize?)
问题描述
如何调整 UIButton 的图像大小?我正在这样设置图像:
How can I adjust the image size of the UIButton? I am setting the image like this:
但是,这会将图像填充到完整按钮,如何使图像变小?
However this fills up the image to the full button, how do I make the image smaller?
推荐答案
如果我理解正确你想要做什么,你需要使用按钮图像边缘插图.比如:
If I understand correctly what you're trying to do, you need to play with the buttons image edge inset. Something like:
这篇关于如何调整 UIButton 的 imageSize?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!