The status bar appears in the QLPreviewController after reconfiguring the toolbar

The status bar is initially hidden in Info.plist when the "Status bar is initially hidden" is set to YES and "View the status of the control panel based on the controller" is set to NO.

But when I introduce the QlPreviewController, after two taps for the document, so that the toolbar disappears and reappears, the status bar also appears in the application.

Any idea how to prevent this?

+7
ios objective-c uistatusbar qlpreviewcontroller
source share
1 answer

In your Info.plist file, set UIViewControllerBasedStatusBarAppearance to true. Then, in all view controllers that you want to hide the status bar, add the following code:

- (BOOL)prefersStatusBarHidden { return YES; } 

By doing this and subclassing the QLPreviewController class, I was able to hide the status bar even after returning from full-screen state.

0
source share

All Articles