QLPreviewController: add ability to reload a single item and/or be notified when an item is being displayed

Originator:davbeck
Number:rdar://16869383 Date Originated:09-May-2014 11:47 AM
Status:Open Resolved:
Product:iOS SDK Product Version:7.1
Classification:Enhancement Reproducible:Always
 
Summary:
When using a QLPreviewController with multiple files that need to be downloaded, the controller has to be reloaded for each file that is downloaded. And because QLPreviewController asks for several items at a time, the current item can appear to flash each time a new item is downloaded, even if the current item has already been downloaded.

Steps to Reproduce:
In previewController:previewItemAtIndex:, download the file if it doesn’t exist locally and reload the controller when the download finishes.

Expected Results:
When the current item is downloaded, the controller will refresh to show the current item. When items are downloaded that are not being displayed, nothing changes. The UI does not flash, if a PDF is scrolled or zoomed, it keeps it’s current state etc.

If QLPreviewController had the ability to reload a single item, rather than the entire controller, it would solve this issue. Likewise, if <QLPreviewControllerDelegate> had a method that told the delegate when an item was being displayed (instead of previewController:previewItemAtIndex:’s behavior where it asks for the previous and next item, as well as everything visible in the list), a download could be initiated only for the displayed item. A combination of both would also be beneficial, since the app could only download what it needs and only refresh what has changed.

Actual Results:
The current item will flash and reset each time another item offscreen is loaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!