ios - 使图像适合iOS中的按钮

标签 ios cocoa-touch uibutton

我想将图像放入 UIButton使用 Storyboard但不能这样做。有人可以告诉我该怎么做。

最佳答案

您可以通过编程方式或通过 StoryBoard 通过 EdgeInset 属性调整图像。

enter image description here

改变它的形象。

enter image description here

并调整左上角右下角以使图像适合。

enter image description here

关于ios - 使图像适合iOS中的按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37811182/

相关文章:

ios - 在 subview Controller 中识别导航是弹出还是推送

ios - 如何在 dismissViewControllerAnimated 完成 block 之后立即执行方法?

iphone - 如何使用网页 View 作为页面( subview )制作无缝 ScrollView

ios - 如何从 Xamarin 中的 Controller 填充表格?

objective-c - 获取自动亮度级别

ios - 为什么页面将 UIToolBar 置于顶部?

ios - 获取物体背后的颜色

ios - 以编程方式位于底部的按钮

ios - 选择 UIButton 时,这个按钮人工制品是什么?

ios - 如何使 UITextField 文本输入在 5-6 个空格字符后开始