Storyboard issue with Xcode 6 and 7

落花浮王杯 提交于 2019-12-25 18:40:20

问题


Why my Main Storyboard appears like shown at Above? I made a copy of the project but now both of them have the same problem with the storyboard! I can run the app using the simulator and it works fine, but I can't see any labels or the buttons.


回答1:


The problem is with your device layout.... Actually it makes on other layout like wAny hAny and now you show it on other layouts like wCompact hRegular....thats why the problem occurs...

Here is the visual site of it....

To prevent this type of things...you need to give constraints to your objects..after making correct constraints, the size classes won't matter that much except adaptive layout




回答2:


Its because of Auto Layout Stuff. Set proper auto layout to you label object.

For eg.

Set Leading,Trailing,Top & Bottom layout to your label & then run your application. You will be able to see it on your screen.



来源:https://stackoverflow.com/questions/30734206/storyboard-issue-with-xcode-6-and-7

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