---
title: "addDestination(withName:at:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uigraphicspdfrenderercontext/adddestination(withname:at:)"
---

# addDestination(withName:at:)

Creates a named destination point in the current PDF page.

## Declaration

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

## Parameters

- `name`: The name of the destination, used as a reference by the doc://com.apple.uikit/documentation/UIKit/UIGraphicsPDFRendererContext/setDestinationWithName(_:for:) method.
- `point`: The location of the destination point, in the PDF coordinate space.

## Discussion

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. note: Specify the point value in the PDF coordinate space, not the Core Graphics context coordinate space. This means that the origin is in the bottom-left corner of the context rather than the top-left, and the y-axis increases in an upwards direction. Use the userSpaceToDeviceSpaceTransform property on CGContext to map between the two. For an example of how to use internal links, including mapping between coordinate spaces, see  Creating internal links in UIGraphicsPDFRenderer.

## See Also

### Managing destinations

- [setDestinationWithName(_:for:)](uikit/uigraphicspdfrenderercontext/setdestinationwithname(_:for:).md)
- [setURL(_:for:)](uikit/uigraphicspdfrenderercontext/seturl(_:for:).md)
