---
title: "selectionManagerWillBeginSelection(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextselectionmanager/delegate-swift.protocol/selectionmanagerwillbeginselection(_:)"
---

# selectionManagerWillBeginSelection(_:)

Tells the delegate that a selection gesture is about to begin.

## Declaration

```swift
optional func selectionManagerWillBeginSelection(_ selectionManager: NSTextSelectionManager)
```

## Parameters

- `selectionManager`: The selection manager that is about to begin selection.

## Discussion

Discussion The selection manager calls this method after selectionManager:shouldBeginSelectionAtPoint: returns YES (or if that method isn’t implemented) and before any selection changes are made.
