在我的应用程序中,我有一个UIWebview,其中所有活动都在进行中。 该应用程序在ios6上运行良好,但在iOS 7中,我的UIwebview内容与状态栏发生冲突。
有没有办法可以为我的UIWindow设置视图以正确显示它。
if([[[UIDevice currentDevice] systemVersion] integerValue] >= 7) {
if (self.window.rootViewController.view.frame.origin.y <=0) {
screenBounds = CGRectMake(0, 20, self.window.bounds.size.width, self.window.bounds.size.height-20);
}
}
self.window.rootViewController = self.viewController;
Thanks,
答案 0 :(得分:0)
尝试:
if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
self.edgesForExtendedLayout = UIRectEdgeNone;
在视图控制器的viewDidLoad方法中。