---
title: "userNotificationCenter(_:shouldPresent:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsusernotificationcenterdelegate/usernotificationcenter(_:shouldpresent:)"
---

# userNotificationCenter(_:shouldPresent:)

Sent to the delegate when the user notification center has decided not to present your notification.

## Declaration

```swift
optional func userNotificationCenter(_ center: NSUserNotificationCenter, shouldPresent notification: NSUserNotification) -> Bool
```

## Parameters

- `center`: The user notification center.
- `notification`: The user notification object.

## Return Value

Return Value true if the user notification should be displayed regardless; false otherwise.
