IOS7以上navigationBar遮挡页面的解决方法.

在IOS7以上,navigationbar车档界面的解决方法.在viewDidload中.添加以下代码.

    if( ([[[UIDevice currentDevice] systemVersion] doubleValue]>=7.0)) {
        self.edgesForExtendedLayout = UIRectEdgeNone;
        self.extendedLayoutIncludesOpaqueBars = NO;
        self.modalPresentationCapturesStatusBarAppearance = NO;
    }

问题还有一些,添加代码后,发觉视图整体下移,但视图的宽高不变.谁有更好的方法,可以分享.

 

以下是收集的第二种方法:

 if( ([[[UIDevice currentDevice] systemVersion] doubleValue]>=7.0)) {

    self.navigationController.navigationBar.translucent = NO;
}
posted @ 2014-11-05 20:09  xclidongbo  阅读(641)  评论(2编辑  收藏  举报