Different iPhone simulator sizes throwing nodes out of place

南楼画角 提交于 2019-12-12 06:06:53

问题


I built my game on the iPhone 6 simulator, and everything was going fine until I needed to switch screen sizes for screenshots. I switched from the 6 to the 5s and now everything is in the wrong place and very off center. How do I make my game suitable for all screen sizes with everything in its place? Will post code if necessary.


回答1:


If you have hardcoded your view locations and sizes (as opposed to making everything relative to everything else) then you will either have to refactor to make everything relative or do some sort of scaling and letterboxing.



来源:https://stackoverflow.com/questions/34363501/different-iphone-simulator-sizes-throwing-nodes-out-of-place

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