<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UINotificationFeedbackGenerator/notificationOccurred(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UINotificationFeedbackGenerator(im)notificationOccurred:"
  },
  "title" : "notificationOccurred(_:)"
}
-->

# notificationOccurred(_:)

Triggers notification feedback.

```
func notificationOccurred(_ notificationType: UINotificationFeedbackGenerator.FeedbackType)
```

## Parameters

`notificationType`

The type of notification feedback. For a list of valid notification types, see the [`UINotificationFeedbackGenerator.FeedbackType`](/documentation/UIKit/UINotificationFeedbackGenerator/FeedbackType) enumeration.

## Discussion

This method tells the generator that a task or action has succeeded, failed, or produced a warning. In response, the generator may play the appropriate haptics, based on the provided [`UINotificationFeedbackGenerator.FeedbackType`](/documentation/UIKit/UINotificationFeedbackGenerator/FeedbackType) value.

For more information on setting up a feedback generator, see the [`UIFeedbackGenerator`](/documentation/UIKit/UIFeedbackGenerator) class.

## See Also

[`-  prepare`](/documentation/UIKit/UIFeedbackGenerator/prepare())

Prepares the generator to trigger feedback.



---

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)