我的應用程序的觀點是重疊在ios7設備狀態欄的導航欄,所以我嘗試了很多「下頂筋」的地產解決方案IOS 7狀態欄和導航欄問題
- 取消選中的故事板
- 自我。 edgesForExtendedLayout = UIRectEdgeNone;
- 集增量Y在故事板-20 ...
但這些都不奏效。 我最後的審判這些行添加到AppDelegate中的didFinishLaunchingWithOptions
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) {
application.statusBarStyle = UIStatusBarStyleLightContent;
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];
self.window.clipsToBounds =YES;
} else {
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
}
它工作的很好,當導航欄被隱藏,但並不隱藏nagivigation時, 導航欄的框架(0,20,320,44)否(0 ,0,320,44) 所以navigationBar的高度似乎是64 .. 這是爲什麼?希望有人解釋我! 感謝提前:)
可能重複和導航欄出現在我的視圖的邊界在iOS 7中](http://stackoverflow.com/questions/17074365/status-bar-and-navigation-bar-appear-over-my-views-bounds-in-ios-7 ) –
@EclipseKim請查閱我提供的指南,並告訴我是否需要更多信息。如果該指南足以幫助您,請隨時用複選標記接受答案。謝謝 –