---
title: "addSelectionIndexPaths(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstreecontroller/addselectionindexpaths(_:)"
---

# addSelectionIndexPaths(_:)

Adds the objects at the specified indexPaths in the tree controller’s content to the current selection.

## Declaration

```swift
func addSelectionIndexPaths(_ indexPaths: [IndexPath]) -> Bool
```

## Discussion

Discussion Attempting to change the selection may cause a commitEditing message which fails, thus denying the selection change.

## See Also

### Managing Selections

- [selectsInsertedObjects](appkit/nstreecontroller/selectsinsertedobjects.md)
- [removeSelectionIndexPaths(_:)](appkit/nstreecontroller/removeselectionindexpaths(_:).md)
- [avoidsEmptySelection](appkit/nstreecontroller/avoidsemptyselection.md)
- [preservesSelection](appkit/nstreecontroller/preservesselection.md)
- [alwaysUsesMultipleValuesMarker](appkit/nstreecontroller/alwaysusesmultiplevaluesmarker.md)
