QuickLook
Preview files, images, and text with Quick Look
QuickLook provides system preview functionality for various content types.
Use QuickLook to:
Note
Not available in Widget
Examples
javascript
let image = await fm.readImage("photo.png");
await QuickLook.present(image);javascript
await QuickLook.present("/path/to/document.pdf");javascript
await QuickLook.present("Hello, World!");Methods
present
Present a Quick Look preview
Displays a preview of the provided content.
typescript
static present(item, fullscreen, callback): voiditem- Content to preview (Image, file path, or text string)fullscreen- Whether to present in fullscreen modecallback- Completion callback when preview is dismissed
Example:
javascript
await QuickLook.present(content, false)