I am having an issue with QLPreviewController on XCode 4.2 iOS SDK 5.0. I run my code on iPod Touch running iOS 4.3.3. Basically my app uses QLPreviewController to preview PDF files in Documents directory and if the app resigns active, the next time it becomes active it will require a user to enter 4-digit PIN number. The app runs fine in general, previewing PDF files with no problem at all. The problem I'm facing is that QLPreviewController shows a blank screen after the app returns from background (and of course after a correct PIN has been entered).
I have the screenshots below. The one before going to background is http://www.mediafire.com/i/?vxdmrx5mjxrwglp and the one after returning from background is http://www.mediafire.com/i/?jhdmavzvccj0f2q
Please note that the source PDF file is not modified at all, and I did call both refreshCurrentPreviewItem and reloadData methods in viewDidAppear.
Similar problems on iPhone Simulator running 4.3.2. However, this problem does not occur on iOS 5.
Does anyone ever experience this issue? Any comments or workaround would be much appreciated.
Thanks
PS. It is strange that when the application goes to background, the delegate previewControllerDidDismiss: is fired on iOS 4. On iOS 5, this does not happen. Perhaps this is the reason of the blank screen. Any thought? Any workaround?