---
title: "reply(toShouldUnselect:)"
framework: preferencepanes
role: symbol
role_heading: Instance Method
path: "preferencepanes/nspreferencepane/reply(toshouldunselect:)"
---

# reply(toShouldUnselect:)

Notifies the main application of the preference pane’s ability to be deselected.

## Declaration

```swift
func reply(toShouldUnselect shouldUnselect: Bool)
```

## Discussion

Discussion If you override shouldUnselect to return NSPreferencePaneUnselectReply.unselectLater, you must invoke reply(toShouldUnselect:) when you have determined whether or not the preference pane can be deselected. You should not override this method.

## See Also

### Selecting and Deselecting the Preference Pane

- [willSelect()](preferencepanes/nspreferencepane/willselect().md)
- [didSelect()](preferencepanes/nspreferencepane/didselect().md)
- [willUnselect()](preferencepanes/nspreferencepane/willunselect().md)
- [didUnselect()](preferencepanes/nspreferencepane/didunselect().md)
- [isSelected](preferencepanes/nspreferencepane/isselected.md)
- [shouldUnselect](preferencepanes/nspreferencepane/shouldunselect.md)
- [NSPreferencePaneUnselectReply](preferencepanes/nspreferencepaneunselectreply.md)
