---
title: resetCursorRects()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nsview/resetcursorrects()
---

# resetCursorRects()

Overridden by subclasses to define their default cursor rectangles.

## Declaration

```swift
func resetCursorRects()
```

## Discussion

Discussion A subclass’s implementation must invoke addCursorRect(_:cursor:) for each cursor rectangle it wants to establish. The default implementation does nothing. Application code should never invoke this method directly; it’s invoked automatically as described in “Responding to User Events and Actions.” Use the invalidateCursorRects(for:) method instead to explicitly rebuild cursor rectangles.

## See Also

### Related Documentation

- [visibleRect](appkit/nsview/visiblerect.md)

### Responding to Cursor Movements

- [addCursorRect(_:cursor:)](appkit/nsview/addcursorrect(_:cursor:).md)
- [removeCursorRect(_:cursor:)](appkit/nsview/removecursorrect(_:cursor:).md)
- [discardCursorRects()](appkit/nsview/discardcursorrects().md)
