【发布时间】:2012-11-21 17:07:49
【问题描述】:
我的应用程序在 iphone 4 中运行良好,但我的 iphone 5 在白色条带下方显示了这个。我添加了
Default-568h.png 也是,但问题仍然存在。我该怎么办?
【问题讨论】:
标签: iphone objective-c xcode iphone-5
我的应用程序在 iphone 4 中运行良好,但我的 iphone 5 在白色条带下方显示了这个。我添加了
Default-568h.png 也是,但问题仍然存在。我该怎么办?
【问题讨论】:
标签: iphone objective-c xcode iphone-5
您似乎需要为视图设置调整大小的掩码。确保在 Interface builder 的尺寸检查器的 Autosizing 部分中将其设置为按高度拉伸。如果您不使用界面生成器,或者在代码中适当地设置掩码。
编辑---
在代码中: 见 autoResizingMask: http://developer.apple.com/library/ios/#documentation/uikit/reference/uiview_class/uiview/uiview.html
界面构建器:
Autosizing 部分是您想要的。
确保为视图设置了这样的掩码。您还需要为任何控件设置外栏。例如,单击底部栏将告诉按钮粘在视图的底部。
【讨论】:
试试这个:
yourView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleTopMargin ;
【讨论】: