---
title: "enqueue(_:postingStyle:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/notificationqueue/enqueue(_:postingstyle:)"
---

# enqueue(_:postingStyle:)

Adds a notification to the notification queue with a specified posting style.

## Declaration

```swift
func enqueue(_ notification: Notification, postingStyle: NotificationQueue.PostingStyle)
```

## Parameters

- `notification`: The notification to add to the queue.
- `postingStyle`: The posting style for the notification. The posting style indicates when the notification queue should post the notification to its notification center.

## Discussion

Discussion This is a convenience method for calling enqueue(_:postingStyle:coalesceMask:forModes:) with coalescing criteria that will coalesce only notifications that match both the notification’s name and object and the runloop mode default.

## See Also

### Managing Notifications

- [enqueue(_:postingStyle:coalesceMask:forModes:)](foundation/notificationqueue/enqueue(_:postingstyle:coalescemask:formodes:).md)
- [dequeueNotifications(matching:coalesceMask:)](foundation/notificationqueue/dequeuenotifications(matching:coalescemask:).md)
