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

# toggleInspector(_:)

Collapses or expands the first inspector in the split view controller using an animation.

```
@IBAction func toggleInspector(_ sender: Any?)
```

## Discussion

If the split view controller doesn’t contain an inspector, calling this method does nothing.

---

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)