---
title: currentSelection
framework: pdfkit
role: symbol
role_heading: Instance Property
path: pdfkit/pdfview/currentselection
---

# currentSelection

The current selection.

## Declaration

```swift
var currentSelection: PDFSelection? { get set }
```

## Discussion

Discussion Returns NULL if no selection exists. Note that this method returns the actual instance of the current PDFSelection object. Therefore, if you want to modify it, you should make a copy of the returned selection and modify that, instead.

## See Also

### Handling Selections

- [setCurrentSelection(_:animate:)](pdfkit/pdfview/setcurrentselection(_:animate:).md)
- [selectAll(_:)](pdfkit/pdfview/selectall(_:).md)
- [clearSelection()](pdfkit/pdfview/clearselection().md)
- [copy(_:)](pdfkit/pdfview/copy(_:).md)
- [scrollSelectionToVisible(_:)](pdfkit/pdfview/scrollselectiontovisible(_:).md)
- [highlightedSelections](pdfkit/pdfview/highlightedselections.md)
