<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSRuleEditor/removeRows(at:includeSubrows:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSRuleEditor(im)removeRowsAtIndexes:includeSubrows:"
  },
  "title" : "removeRows(at:includeSubrows:)"
}
-->

# removeRows(at:includeSubrows:)

Removes the rows at given indexes.

```
func removeRows(at rowIndexes: IndexSet, includeSubrows: Bool)
```

## Parameters

`rowIndexes`

Indexes of one or more rows in the receiver.
  
  > Important:
  > Raises an `NSRangeException` if any index in `rowIndexes` is less than `0` or greater than or equal to the number of rows.

`includeSubrows`

If <doc://com.apple.documentation/documentation/Swift/true>, then sub-rows of deleted rows are also deleted; if <doc://com.apple.documentation/documentation/Swift/false>, then each sub-row is adopted by its first non-deleted ancestor, or becomes a root row.

---

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)