<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextView/rulerView(_:didRemove:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextView(im)rulerView:didRemoveMarker:"
  },
  "title" : "rulerView(_:didRemove:)"
}
-->

# rulerView(_:didRemove:)

Modifies the paragraph style of the paragraphs containing the selection—if possible—by removing the specified marker.

```
func rulerView(_ ruler: NSRulerView, didRemove marker: NSRulerMarker)
```

## Parameters

`ruler`

The ruler view sending the message.

`marker`

The marker that was removed.

## Discussion

This method records the change by invoking [`didChangeText()`](/documentation/AppKit/NSTextView/didChangeText()) after removing the marker.

`NSTextView` checks for permission to move or remove a tab stop in its [`rulerView(_:shouldMove:)`](/documentation/AppKit/NSTextView/rulerView(_:shouldMove:)) method, which invokes [`shouldChangeText(in:replacementString:)`](/documentation/AppKit/NSTextView/shouldChangeText(in:replacementString:)) to send out the proper request and notifications, and only invokes this method if permission is granted.

## See Also

[`representedObject`](/documentation/AppKit/NSRulerMarker/representedObject)

The object the receiver represents.

[`shouldChangeText(in:replacementString:)`](/documentation/AppKit/NSTextView/shouldChangeText(in:replacementString:))

Initiates a series of delegate messages (and general notifications) to determine whether modifications can be made to the characters and attributes of the receiver’s text.



---

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)