A request to generate a thumbnail for a file.


class Request : NSObject


Creating a Thumbail Request

init(fileAt: URL, size: CGSize, scale: CGFloat, representationTypes: QLThumbnailGenerator.Request.RepresentationTypes)

Creates a new request for a thumbnail with the specified parameters for a file at a provided URL.

Describing the Requested Thumbnail

var size: CGSize

The size of the thumbnails.

var scale: CGFloat

The scale of the thumbnails.

var minimumDimension: CGFloat

The minimum dimension for a thumbnail.

var iconMode: Bool

A Boolean value indicating whether the generated thumbnail request should include icon decorations.

struct QLThumbnailGenerator.Request.RepresentationTypes

The various types of thumbnails that you can request.


Inherits From

See Also

Generating a Thumbnail

func generateBestRepresentation(for: QLThumbnailGenerator.Request, completion: (QLThumbnailRepresentation?, Error?) -> Void)

Generates the best possible thumbnail representation for a file and calls a handler upon completion.

func generateRepresentations(for: QLThumbnailGenerator.Request, update: ((QLThumbnailRepresentation?, QLThumbnailRepresentation.RepresentationType, Error?) -> Void)?)

Generates various thumbnail representations for a file and calls the update handler for each thumbnail representation.