How can I make a great document thumbnail?

My app uses thumbnails as preview icons for documents.


I build the thumbnail as an image, by capturing a screenshot of the UI. But I don't want the screenshot to reflect the specific layout of a particular device or orientation. It's not difficult to force the thumbnail capture to a specific fixed size. But the traits of the device still influence the appearance. So my iPhone-saved documents look different from my iPad-saved documents, thanks to size-class settings in the storyboard.


My options appear to be.

1) Programmatically adjusting everything in the UI to the standard layout. Capturing, And then undoing that change.

2) Building a parallel (hidden) device-independent view controller and storyboard, for this single purpose.

3) Rendering on a childView controller which I have forced to a set of fixed traits.


The third option appears to be the least work, but I am not succeeding in transplanting the main view to this child controller.


Any help would be warmly received!

Replies

Hmm.

According to the WWDC15 presentation on UIDocument, building a document thumbnail using a UIView is a no no.

So I have to create some facsimile of my document from scratch using other means. This is non-trivial.

Hi, Carniphage. I appreciate your attention to detail and your desire to not confuse users by cutting corners. But yeah, as you've discovered, it's not easy to make high-quality work.


In your case, I believe that it might actually be better to come up with a simplified representation of your document that's optimized for the small size of a thumbnail. You could omit small or secondary elements and focus on what really makes each document unique and recognizable. The best way to do that, I think, is to forgo the view-capture strategy entirely and use either a rendered preview of the document only (if your app is a design/layout app) or a simplified template system with modular image assets (GarageBand's track system comes to mind).