Search code examples
macoscocoaquicklookikimagebrowserview

How to make IKImageBrowserView Quick Look icons look like Finder icons?


IKImageBrowserView provides a multi-image view much like Finder (in fact, a class-dump shows that Finder uses it internally). And there's a constant IKImageBrowserQuickLookPathRepresentationType which allows you to provide paths or URLs to the browser view, which it displays as Quick Look previews.

However, these previews aren't like the "icon"-style previews that Finder displays:
Finder style

But rather a larger preview:
plain preview

Is there a way to make IKImageBrowserView use the icon preview style, with the curled document corner and such?


Solution

  • There is no public way to do that directly (using IKImageBrowserQuickLookPathRepresentationType) so you will have to produce the image yourself using QLThumbnail API (kQLThumbnailOptionIconModeKey) and feed that to the IKImageBrowserView.