---
title: mainView
framework: preferencepanes
role: symbol
role_heading: Instance Property
path: preferencepanes/nspreferencepane/mainview
---

# mainView

The main view of the preference pane.

## Declaration

```swift
var mainView: NSView { get set }
```

## Discussion

Discussion Subclasses should not need to override this unless they override loadMainView() or assignMainView().

## See Also

### Getting the Bundle Information

- [bundle](preferencepanes/nspreferencepane/bundle.md)
- [mainNibName](preferencepanes/nspreferencepane/mainnibname.md)
