<!--
{
  "availability" : [
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextSelectionManager/Delegate-swift.protocol/selectionManagerWillBeginSelection(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSTextSelectionManagerDelegate(im)selectionManagerWillBeginSelection:"
  },
  "title" : "selectionManagerWillBeginSelection(_:)"
}
-->

# selectionManagerWillBeginSelection(_:)

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

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

## Parameters

`selectionManager`

The selection manager that is about to begin selection.

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)