Function

QLPreviewRequestFlushContext(_:_:)

Flush the context and sets the preview response.

Declaration

func QLPreviewRequestFlushContext(_ preview: QLPreviewRequest!, _ context: CGContext!)

Parameters

preview

The preview request object.

context

The graphics context to flush.

Discussion

You should call this method immediately after drawing in the graphics contexts created by QLPreviewRequestCreateContext(_:_:_:_:) and QLPreviewRequestCreatePDFContext(_:_:_:_:).

Special Considerations

Thread-safety: This function should be called in the same thread as the preview request is made in; generally, this is the same thread in which the GeneratePreviewForURL callback was invoked.