[英]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.