Xcode - Button looks good in storyboard but not on emulator

被刻印的时光 ゝ 提交于 2020-01-05 04:31:11

问题


When I work with buttons in the storyboard they look good, like this:

But when i run the app they turn out like this:

Do you guys know why?

Here are som settings:

Thanks!


回答1:


You might have put image in Image attribute of inspector. Put that image in Background attribute of inspector.




回答2:


top one in your attribute inspector Type, change that to Custom from Rounded. By the way, our iOS has simulator not emulator. In android sdk we call it emulator ;)




回答3:


check the view content mode in the attribute inspector it's in the fourth tab on your right colum. content mode can be scale to fill, aspect fit and a bunch of other possibilities. This will affect how it is presented. Check also in the fifth tab how your button autosizing is set.



来源:https://stackoverflow.com/questions/14370712/xcode-button-looks-good-in-storyboard-but-not-on-emulator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!