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

# removeTitlebarAccessoryViewController(at:)

Removes the view controller at the specified index from the window’s array of title bar accessory view controllers.

```
func removeTitlebarAccessoryViewController(at index: Int)
```

## Parameters

`index`

The index in the array of title bar view controllers from which to remove the view controller.

## Discussion

You can also use [`removeFromParent()`](/documentation/AppKit/NSViewController/removeFromParent()) to remove a specific title bar accessory view controller.

---

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)