1

我添加了一个 ViewController 并选择了所有指标作为推断。还尝试同时执行编辑器->解决自动布局问题->添加缺少的约束/重置为建议的约束。

附加到 ViewController 模式的视图是 Scale To Fill 并且所有与 Autosize 相关的框都被勾选。

我正在使用以下代码:

if (splashView.frame.size.height == 568.00) {//for iphone5
    [pngPic setImage:[UIImage imageNamed:@"iphone5_splash.png"]];
    screenTrackLoc = CGPointMake(splashView.frame.size.width - 45, 60);
}
else {//iphone 4
    [pngPic setImage:[UIImage imageNamed:@"iphone4_splash.png"]];
    screenTrackLoc = CGPointMake(splashView.frame.size.width - 45, 40);
}

对于 3.5 英寸模拟器,我仍然得到 568.00 的高度结果。我错过了什么?

4

0 回答 0