我正在使用Xcode 4.5开发新应用,并计划将部署目标设置为iOS 4.3。该应用程序应支持iPhone 5和iPhone 4。我搜索了如何设计iPhone 5和iPhone 4并找到了以下网址:iOS 6 apps - how to deal with iPhone 5 screen size?
我们可以使用自动调整大小掩码来设计iPhone 5和iPhone 4。我已经为iPhone 5和iPhone 4设计了一些屏幕,但我有一个疑问:自动调整大小掩码也适用于iPhone 5吗?我只使用了iPhone 4。需要验证以下代码。请帮忙。
上面的代码正确吗?还是应该使用自动调整大小来适配iPhone 5?
if ([[UIScreen mainScreen] bounds].size.height < 568) {
topView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin |
UIViewAutoresizingFlexibleBottomMargin |
UIViewAutoresizingFlexibleLeftMargin |
UIViewAutoresizingFlexibleRightMargin |
UIViewAutoresizingFlexibleWidth |
UIViewAutoresizingFlexibleHeight ;
}
上面的代码正确吗?还是应该使用自动调整大小来适配iPhone 5?