Quick Look Previews from the Ground Up

WWDC 2018

Posted by Den on July 13, 2018 · 6 mins read
Quick Look Previews from the Ground Up

Quick Look Previews from the Ground Up

WWDC 2018

Quick Look Previews from the Ground Up

WWDC 2018

Supported file types

  • (new) USDZ (AR format)
  • Images, Videos, Audio files, PDF documents
  • HTML documents, Rich Text Format (RTF) documents
  • Text files that conform to public.text
  • iWork and Office documents
  • ZIP archives
  • File formats covered by 3rd Party Quick Look preview extensions

When to use Quick Look

  • Zoom into photos
  • Flick through a collection of photos
  • Play back an audio file or video
  • Present a document PDF

When not to use Quick Look

Presenting Quick Look

Presenting Quick Look

Modal

Push

Controlling Quick Look

QLPreviewControllerDelegate protocol
Animated transitions

Creating a Preview Extension

Step 1 — Creation using Xcode template

Step 2 — Editing the Info.plist

Step 3 — QLPreviewingController protocol

Thumbnail Extension

Creating a Thumbnail Extension

Step 1 — Creation using Xcode template

Step 2 — Editing the Info.plist

Step 3 — Implementing your QLThumbnailProvider subclass

  • Using CoreGraphics, UIKit

Demo