<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NotificationQueue/enqueue(_:postingStyle:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSNotificationQueue(im)enqueueNotification:postingStyle:"
  },
  "title" : "enqueue(_:postingStyle:)"
}
-->

# enqueue(_:postingStyle:)

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

```
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

This is a convenience method for calling [`enqueue(_:postingStyle:coalesceMask:forModes:)`](/documentation/Foundation/NotificationQueue/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`](/documentation/Foundation/RunLoop/Mode/default).

---

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)