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:
kUTTypeImagekUTTypePDFkUTTypeHTMLkUTTypeXMLkUTTypePlainTextkUTTypeRTFkUTTypeRTFDkUTTypeMoviekUTTypeAudio
See Also
Requesting previews
QLPreviewRequestCopyContentUTI(_:)QLPreviewRequestCopyOptions(_:)QLPreviewRequestCopyURL(_:)QLPreviewRequestCreateContext(_:_:_:_:)QLPreviewRequestCreatePDFContext(_:_:_:_:)QLPreviewRequestFlushContext(_:_:)QLPreviewRequestGetDocumentObject(_:)QLPreviewRequestSetDocumentObject(_:_:_:)QLPreviewRequestGetGeneratorBundle(_:)QLPreviewRequestGetTypeID()QLPreviewRequestIsCancelled(_:)QLPreviewRequestSetDataRepresentation(_:_:_:_:)