---
title: "toggleInspector(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nssplitviewcontroller/toggleinspector(_:)"
---

# toggleInspector(_:)

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

## Declaration

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

## Discussion

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