<!--
{
  "availability" : [
    "macCatalyst: 14.0.0 -",
    "macOS: 10.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PreferencePanes",
  "identifier" : "/documentation/PreferencePanes/NSPreferencePane/willSelect()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Preference Panes"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPreferencePane(im)willSelect"
  },
  "title" : "willSelect()"
}
-->

# willSelect()

Notifies the preference pane that the main app is about to display the preference pane’s main view.

```
func willSelect()
```

## Discussion

Default implementation does nothing. Override this method to perform actions right before the main view is displayed.

---

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)