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

# rulerView(_:willSetClientView:)

Informs the client view that aRulerView is about to be appropriated by newClient.

## Declaration

```swift
func rulerView(_ ruler: NSRulerView, willSetClientView newClient: NSView)
```

## Discussion

Discussion The client view can use this opportunity to clear any cached information related to the ruler.

## 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(_:shouldAdd:)](appkit/nsview/rulerview(_:shouldadd:).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)
