在AppDelegate中加入如下的代码:
if([[[UIDevicecurrentDevice]systemVersion] floatValue]>6.1)
{ if(ScreenHeight ==480){
self.window.frame =CGRectMake(0,20,320, 460);
}else if(ScreenHeight ==568){
self.window.frame =CGRectMake(0,20,320, 548);
}
}
#pragma mark - iOS7&iOS6适配
- (UIStatusBarStyle)preferredStatusBarStyle
{
returnUIStatusBarStyleLightContent;
}
- (BOOL)prefersStatusBarHidden
{
return NO;
}