简易的屏幕适配

//判断屏幕的尺寸
CGRect screenBounds = [[UIScreen mainScreen] bounds];
if (screenBounds.size.height == 568) {
//举例.......
//CalculateViewController *calculateCtrl = [[CalculateViewController alloc]initWithNibName:@"CalculateViewController" bundle:nil];
//self.window.rootViewController = calculateCtrl;
}else if(screenBounds.size.height == 480) {
//举例.......
//CalculateViewController *calculateCtrl = [[CalculateViewController alloc]initWithNibName:@"CalculateForThree" bundle:nil];
//self.window.rootViewController = calculateCtrl;
}
原文地址:https://www.cnblogs.com/pengyuan/p/3485364.html