---
title: "startTracking(at:in:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nscell/starttracking(at:in:)"
---

# startTracking(at:in:)

Begins tracking mouse events within the receiver.

## Declaration

```swift
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

Return Value true if the receiver is set to respond continuously or set to respond when the mouse is dragged, otherwise false.

## Discussion

Discussion The NSCell implementation of 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.

## See Also

### Tracking the Mouse

- [trackMouse(with:in:of:untilMouseUp:)](appkit/nscell/trackmouse(with:in:of:untilmouseup:).md)
- [continueTracking(last:current:in:)](appkit/nscell/continuetracking(last:current:in:).md)
- [stopTracking(last:current:in:mouseIsUp:)](appkit/nscell/stoptracking(last:current:in:mouseisup:).md)
- [mouseDownFlags](appkit/nscell/mousedownflags.md)
- [prefersTrackingUntilMouseUp](appkit/nscell/preferstrackinguntilmouseup.md)
- [getPeriodicDelay(_:interval:)](appkit/nscell/getperiodicdelay(_:interval:).md)
