Quick look is a system framework to preview and edit files. It is secure and private to protect you from unsafe files. Just hit space on macOS or long press on iOS. On VisionOS you pinch and drag the file outside of the application window. Supports print and drag for zooming on usdz files. This is called Windowed Quick Look
Windowed quick look
- Allows for QL outside of your app, so you can put it next to key content. You can also close your app and it will persist. Some files will provide SharePlay – this will for group collaboration.
- Apps can present this with a NSItemProvider using URL to drag provider outside of your window. This is a copy of the provided file, so edits won’t be send back to your applications file. (Add .onDrag modifier to an item in SwiftUI.
- In websites, you can achieve this with AR Content linking – and get the xrOS feature by default – check Advances in AR Quicklook form 2019. You can also get this by simply adding [rel=“ar”] to a link anchor in your html … safari will then present your item in a quicklook preview.
In-app Quick look
- All you need to do is pass a URL to quickLookPreview to get a full screen preview sheet. Or if you us a QLPreviewController, you can provide customizations, existing code using these will just work on xrOS
- Supported file types include:
- Images
- Videos
- Audio Files
- PDF documents
- HTML documents
- RTF (Rich text format) documents
- Text files that conform to public.text
- iWork and Office documents
- Zip archives
- USDZ