8
votes

Status bar is initially hidden in Info.plist with "Status bar is initially hidden" set to YES and "View controller-based status bar appearance" set to NO.

But when I present a QlPreviewController, after two taps to document to make toolbar disappear and appear again, status bar appears in application too.

Any idea how to prevent this from happening?

1
Did you find an answer? Struggling with the same problem here. Thx!Alessandro
@Alessandro Sadly, no. I'm just making status bar dissappear again when QlPreviewController is removed from superview.Batuhan Sener

1 Answers

0
votes

In your Info.plist file, set UIViewControllerBasedStatusBarAppearance as 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 create a sub class of QLPreviewController I was able to hide the status bar, even after returning from full screen state.