Instance Method

addDestination(withName:at:)

Creates a named destination point in the current PDF page.

Declaration

func addDestination(withName name: String, at point: CGPoint)

Parameters

name

The name of the destination, used as a reference by the setDestinationWithName(_:for:) method.

point

The location of the destination point, in the PDF coordinate space.

Discussion

Use this method in conjunction with the setDestinationWithName(_:for:) method to create internal links within a PDF. This method represents the creation of the points to which the PDF viewer will jump when a user clicks a link.

For an example of how to use internal links, including mapping between coordinate spaces, see Creating Internal Links in UIGraphicsPDFRenderer.

See Also

Managing Destinations

func setDestinationWithName(String, for: CGRect)

Creates a link rectangle in the current page that when clicked, will jump the PDF viewer to the named destination.

func setURL(URL, for: CGRect)

Creates a link to an external resource defined by a URL