---
title: "post(name:object:userInfo:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/notificationcenter/post(name:object:userinfo:)"
---

# post(name:object:userInfo:)

Creates a notification with a given name, sender, and information and posts it to the notification center.

## Declaration

```swift
func post(name aName: NSNotification.Name, object anObject: Any?, userInfo aUserInfo: [AnyHashable : Any]? = nil)
```

## Parameters

- `aName`: The name of the notification.
- `anObject`: The object posting the notification.
- `aUserInfo`: A user info dictionary with optional information about the notification.

## See Also

### Posting notifications

- [post(_:)](foundation/notificationcenter/post(_:)-3x2st.md)
- [post(name:object:)](foundation/notificationcenter/post(name:object:).md)
