我在iOS 8上構建應用程序,並在UIViewController與modalPresentationStyle = UIModalPresentationPageSheet一起呈現時出現狀態欄可見性問題。我閱讀了文檔,提供了modalPresentationCapturesStatusBarAppearance用於隱藏狀態欄的新API的真實值,但在此模式呈現方式中我沒有得到任何結果。在我的應用程序中,我沒有顯示狀態欄。它在iOS 7中使用這種風格工作得很好,但是當涉及到iOS 8時,它會產生問題。這裏是我的代碼:iOS 8隱藏狀態欄的UIModalPresentationPageSheet
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:viewController];
nav.modalPresentationStyle = UIModalPresentationPageSheet;
nav.modalTransitionStyle=UIModalTransitionStyleCoverVertical;
nav.modalPresentationCapturesStatusBarAppearance = YES; // To hide status bar, doest work with UIModalPresentationPageSheet style
[self.navigationController presentViewController:nav animated:YES completion:NULL];
我得到這樣的:
但所需的輸出是
請幫助!
您是否發現此問題的修復?我也有隱藏PageSheet樣式和狀態欄的ios8問題。謝謝 – rwyland 2015-02-03 00:44:30