UINavigationBar 和view 重疊覆蓋問題

若是沒有是storyboard進行界面設計,在ios7以後會遇到rootviewcontroller的view被navigationbar遮蓋的問題,其實很好解決
1. 設置view的top bar 爲Opaue Navigation Bar
screenshotios

2.在vc中加入
```設計

  • (void)viewDidLoad { [super viewDidLoad]; if( ([[[UIDevice currentDevice] systemVersion] doubleValue]>=7.0)) { self.edgesForExtendedLayout = UIRectEdgeNone; } // Do any additional setup after loading the view from its nib. } ```
相關文章
相關標籤/搜索