简体   繁体   English

iPhone 4和5上的Storyboard Segue Cover垂直过渡

[英]Storyboard segue cover vertical transition on iPhone 4 and 5

I'm building an app that supports iOS5+ and is made for both iPhone 4 and iPhone 5 screen sizes. 我正在构建一个支持iOS5 +且适用于iPhone 4和iPhone 5屏幕尺寸的应用程序。 It currently uses storyboards for most of the flow. 目前,大部分流程都使用情节提要。

When I do an animated modal segue that covers vertical, there is a half inch of white space on top of the view -- only on a 3.5 inch screen (iPhone 4). 当我执行覆盖垂直方向的动画模态搜索时,视图顶部只有半英寸的空白区域-仅在3.5英寸的屏幕(iPhone 4)上。 There is no whitespace on iPhone 5, as the view is completely filled with content. iPhone 5上没有空格,因为视图完全充满了内容。

This is confusing to me because I'm resizing the view in the viewDidLoad to match the screen size. 这让我感到困惑,因为我正在调整viewDidLoad中的视图大小以匹配屏幕尺寸。 I've also tried setting the background color to clear, but still no dice. 我还尝试将背景色设置为清除,但仍然没有骰子。 Here's what I'm doing to resize it: 这是我正在调整大小的方法:

[self.view height:[UIScreen mainScreen].bounds.size.height];

Any ideas? 有任何想法吗?

It was just my background image (UIImage at the very back of the view). 这只是我的背景图片(UIImage位于视图的最后面)。 I had it sized for iPhone 5 and fixed to the bottom of the view. 我有适合iPhone 5的尺寸,并固定在视图的底部。 The whitespace sticking out the top was just the top of the background image... I'm not sure why I thought it would magically get cut off. 顶部突出的空白只是背景图片的顶部。我不确定为什么我会以为它会被神奇地切断。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM