无论当前手机型号是什么:
状态栏(信号,电池等那一栏)高度 = 20;
获得状态栏:
CGRect rect;
rect = [[UIApplication sharedApplication] statusBarFrame];
// 修改状态栏颜色(黑色)
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault];
// 修改状态栏颜色(白色)
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
navigationBar(self.view.title那一栏
)高度 = 44;
获得navigationBar:
self.navigationController.navigationBar.frame
// navigationBar贴图
UIImageView *View = [[UIImageView alloc] initWithFrame:CGRectMake(0, -20, ScreenWidth, 64)];
View.image = [UIImage imageNamed: @"导航栏"];
[self.navigationController.navigationBar addSubview:View];
tabbar高度 = 49;
获得tabbar:
UITabBarController *tabbarController = [[UITabBarController alloc] init];
tabbarController.tabBar.frame