[英]UIButton image doesn't have the right size on simulator
在UIButton上设置图像时遇到问题。 查看下面的图片:
如您在第一张图像上看到的,左侧是Xcode上图像的显示方式,右侧是较小的模拟器上的图像显示方式。
第二张图像仅供参考,它显示了如何在Xcode上以不同的屏幕尺寸显示。
有什么想法吗?
我只是在视图中添加了一个按钮,此按钮在所有方面都有约束,以防万一有人想知道。
谢谢
只是预感,但这可能与视网膜和非视网膜图像大小有关。 尝试这个。
尝试在图像名称后添加@ 2x
[英]UIButton doesn't change the image
[英]UIButton doesn't show image
[英]Why is my UIButton Image size different in Simulator and Device?
[英]Changing text size of uibutton doesn't work
[英]The size of the UIButton doesn't change - Swift
[英]UIButton with Animation Image doesn't showing
[英]UIButton with image and text doesn't work
[英]iOS - UIButton image doesn't fit as expected
[英]UIButton image doesn't change when tapped
[英]UIButton Image doesn't changes in a “for” loop
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.