---
title: "setSelectionIndexes(_:byExtendingSelection:)"
framework: quartz
role: symbol
role_heading: Instance Method
path: "quartz/ikimagebrowserview/setselectionindexes(_:byextendingselection:)"
---

# setSelectionIndexes(_:byExtendingSelection:)

Selects cells at the specified indexes.

## Declaration

```swift
func setSelectionIndexes(_ indexes: IndexSet!, byExtendingSelection extendSelection: Bool)
```

## Parameters

- `indexes`: The indexes of the cells you want to select.
- `extendSelection`: A BOOL value that specifies whether to extend the current selection. Pass doc://com.apple.documentation/documentation/Swift/true to extends the selection; doc://com.apple.documentation/documentation/Swift/false replaces the current selection.

## See Also

### Reordering and Groups Items

- [selectionIndexes()](quartz/ikimagebrowserview/selectionindexes().md)
- [setAllowsMultipleSelection(_:)](quartz/ikimagebrowserview/setallowsmultipleselection(_:).md)
- [allowsMultipleSelection()](quartz/ikimagebrowserview/allowsmultipleselection().md)
- [setAllowsEmptySelection(_:)](quartz/ikimagebrowserview/setallowsemptyselection(_:).md)
- [allowsEmptySelection()](quartz/ikimagebrowserview/allowsemptyselection().md)
- [setAllowsReordering(_:)](quartz/ikimagebrowserview/setallowsreordering(_:).md)
- [allowsReordering()](quartz/ikimagebrowserview/allowsreordering().md)
- [setAnimates(_:)](quartz/ikimagebrowserview/setanimates(_:).md)
- [animates()](quartz/ikimagebrowserview/animates().md)
- [expandGroup(at:)](quartz/ikimagebrowserview/expandgroup(at:).md)
- [collapseGroup(at:)](quartz/ikimagebrowserview/collapsegroup(at:).md)
- [isGroupExpanded(at:)](quartz/ikimagebrowserview/isgroupexpanded(at:).md)
