导航

简易的屏幕适配

Posted on 2013-12-21 18:13  iOS攻城师  阅读(155)  评论(0编辑  收藏  举报
//判断屏幕的尺寸
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;
}