---
title: "rulerView(_:shouldAdd:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsview/rulerview(_:shouldadd:)"
---

# rulerView(_:shouldAdd:)

Requests permission for aRulerView to add aMarker, an NSRulerMarker being dragged onto the ruler by the user.

## Declaration

```swift
func rulerView(_ ruler: NSRulerView, shouldAdd marker: NSRulerMarker) -> Bool
```

## Discussion

Discussion If the client returns true the ruler view accepts the new marker and begins tracking its movement; if the client returns false the ruler view refuses the new marker.

## See Also

### Synchronizing with Ruler Views

- [rulerView(_:didAdd:)](appkit/nsview/rulerview(_:didadd:).md)
- [rulerView(_:didMove:)](appkit/nsview/rulerview(_:didmove:).md)
- [rulerView(_:didRemove:)](appkit/nsview/rulerview(_:didremove:).md)
- [rulerView(_:handleMouseDownWith:)](appkit/nsview/rulerview(_:handlemousedownwith:).md)
- [rulerView(_:locationFor:)](appkit/nsview/rulerview(_:locationfor:).md)
- [rulerView(_:pointForLocation:)](appkit/nsview/rulerview(_:pointforlocation:).md)
- [rulerView(_:shouldMove:)](appkit/nsview/rulerview(_:shouldmove:).md)
- [rulerView(_:shouldRemove:)](appkit/nsview/rulerview(_:shouldremove:).md)
- [rulerView(_:willAdd:atLocation:)](appkit/nsview/rulerview(_:willadd:atlocation:).md)
- [rulerView(_:willMove:toLocation:)](appkit/nsview/rulerview(_:willmove:tolocation:).md)
- [rulerView(_:willSetClientView:)](appkit/nsview/rulerview(_:willsetclientview:).md)
