Situation: my app needs to present a full screen modal view whenever it becomes active (from background) to ask the user for a PIN. All fine.
Unless: if the user previews a file using QLPreviewController, leaves the app and comes back, the PIN input controller will be presented modally from the QLPreviewController which I’m keeping a reference to. The PIN input is shown but when it dismisses, I see a checkerboard-styled background which is even scrollable. Seems to be some leftover of the PreviewController but the actual preview data is no longer shown. Any idea what could cause that?
Do I have to reload the contents of the preview somehow?
I had similar issue and I’ve managed to pin down the problem to either
viewWillDisappearorviewDidDisappearmethods. My solution was to subclassQLPreviewControllerand overwrite those methods with empty implementation i.e. skipping the call tosuper. I don’t know if it’s very safe, though I haven’t encountered issues and it solved my problem.