Contents

UIGraphicsSetPDFContextDestinationForRect(_:_:)

Links a rectangular area on the current page to the specified jump destination.

Declaration

func UIGraphicsSetPDFContextDestinationForRect(_ name: String, _ rect: CGRect)

Parameters

  • name:

    A named destination in the PDF document. This is the same name you used when creating the jump destination using the Uigraphicsaddpdfcontextdestinationatpoint(_:_:) function.

  • rect:

    A rectangle on the current page of the PDF context.

Discussion

You use this function to create live links within a PDF document. Tapping the specified rectangle in the PDF document causes the document to display the contents at the associated jump destination.

If the current graphics context is not a PDF context, this function does nothing.

See Also

PDF creation