<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSToolbarItemGroup/isSelected(at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSToolbarItemGroup(im)isSelectedAtIndex:"
  },
  "title" : "isSelected(at:)"
}
-->

# isSelected(at:)

Indicates whether a specified index is currently selected.

```
func isSelected(at index: Int) -> Bool
```

## Parameters

`index`

The index of the subitems in a grouped toolbar item.

## Return Value

A Boolean value indicating whether the specified index is currently selected.

## Discussion

Use this method when you specify the [`NSToolbarItemGroup.SelectionMode.selectAny`](/documentation/AppKit/NSToolbarItemGroup/SelectionMode-swift.enum/selectAny) selection mode for the grouped toolbar item to determine which subitems are currently selected.

---

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)