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

# item(at:)

Returns the menu item at a specific location of the menu.

```
func item(at index: Int) -> NSMenuItem?
```

## Parameters

`index`

An integer index locating a menu item in a menu.

## Return Value

The found menu item (an object conforming to the NSMenuItem protocol) or `nil` if the object couldn’t be found.

## Discussion

This method raises an exception if `index` is out of bounds.

## See Also

[`index(of:)`](/documentation/AppKit/NSMenu/index(of:))

Returns the index identifying the location of a specified menu item in the menu.



---

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)