---
title: selectedViewController
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nspagecontroller/selectedviewcontroller
---

# selectedViewController

The view controller associated with the selected object..

## Declaration

```swift
var selectedViewController: NSViewController? { get }
```

## Discussion

Discussion May be nil if not using view controllers. This property is only relevant in book mode. See Book Mode (View Controller Mode) for details.
