如何设计支持所有 iphone 屏幕尺寸的单个故事板文件? [英] How to design single storyboard file that supports all iphone screen sizes?

查看:25
本文介绍了如何设计支持所有 iphone 屏幕尺寸的单个故事板文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用故事板和 xcode 4.6 来设计 Iphone 应用程序.我有非常复杂的视图控制器,并且一些子视图(如滚动视图和自动完成 tablviews)是动态生成的.当为 iphone 4 构建应用程序时,一切正常.但是,当使用 Iphone(retina-4 inch) 模拟器时,我注意到屏幕顶部和底部有空间,还有一些子视图(如滚动视图和自动完成表视图 ..)错位并覆盖了该视图控制器中的其他子视图.我尝试搜索并发现一些建议根据屏幕大小设计/加载两个 xib 文件.我已经启用了自动调整大小蒙版和自动布局,但问题仍然存在.

I am using storyboard and xcode 4.6 for designing Iphone app. I have very complex viewscontrollers and some of the subviews(like scrollview's and autocomplete tablviews) have generated dynamically. When app build for iphone 4 everything works fine. But, when using Iphone(retina-4 inch) simulator, I noticed that there is space at the top and bottom of the screen and also some of the subviews (like scrollviews and autocomplete tableviews ..) misplaced and covering other subviews in that viewcontroller. I tried to search and found some are suggesting to design/load two xib files based on screen size. I have enabled both autoresize masks and autolayout, but still the problem persists.

如何设计一个对 Iphone-4 和 Iphone-5 都可行的故事板文件.

参考:如何开发或迁移适用于 iPhone 5 屏幕分辨率的应用?

更新附件截图:故事板文件

提前致谢...

推荐答案

使用下图中的按钮在视网膜 4 英寸和 3.5 英寸之间切换.使用右上角大小检查器下的自动调整大小工具让视图正确定位.

use the button in the picture below to toggle between retina 4 in and 3.5 inch. use the autosizing tool under the size inspector on the top right to get views to position themselves correctly.

这篇关于如何设计支持所有 iphone 屏幕尺寸的单个故事板文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆