Contents

QLPreviewRequestSetURLRepresentation(_:_:_:_:)

Sets the contents of the file at the given URL as the response to the preview request.

Declaration

func QLPreviewRequestSetURLRepresentation(_ preview: QLPreviewRequest!, _ url: CFURL!, _ contentTypeUTI: CFString!, _ properties: CFDictionary!)

Parameters

  • preview:

    The preview request object.

  • url:

    The URL of the file that’s returned as the response to the preview request. The file must be one of the supported file types.

  • contentTypeUTI:

    The UTI specifying the content type of the preview.

  • properties:

    Additional properties for the preview response.

Discussion

This function returns preview data at the given URL to the client. How the Quick Look feature handles the data depends upon the value of the given content type UTI. The content data of the preview must be of a native Quick Look type. Quick Look supports the following UTIs:

  • kUTTypeImage

  • kUTTypePDF

  • kUTTypeHTML

  • kUTTypeXML

  • kUTTypePlainText

  • kUTTypeRTF

  • kUTTypeRTFD

  • kUTTypeMovie

  • kUTTypeAudio

See Also

Requesting previews