<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCell/startTracking(at:in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCell(im)startTrackingAt:inView:"
  },
  "title" : "startTracking(at:in:)"
}
-->

# startTracking(at:in:)

Begins tracking mouse events within the receiver.

```
func startTracking(at startPoint: NSPoint, in controlView: NSView) -> Bool
```

## Parameters

`startPoint`

The initial location of the cursor.

`controlView`

The `NSControl` object managing the receiver.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the receiver is set to respond continuously or set to respond when the mouse is dragged, otherwise <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

The `NSCell` implementation of [`trackMouse(with:in:of:untilMouseUp:)`](/documentation/AppKit/NSCell/trackMouse(with:in:of:untilMouseUp:)) invokes this method when tracking begins.  Subclasses can override this method to implement special mouse-tracking behavior at the beginning of mouse tracking—for example, displaying a special cursor.

---

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)