notificationOccurred(_:)
Triggers notification feedback.
Declaration
func notificationOccurred(_ notificationType: UINotificationFeedbackGenerator.FeedbackType)Parameters
- notificationType:
The type of notification feedback. For a list of valid notification types, see the 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 value.
For more information on setting up a feedback generator, see the UIFeedbackGenerator class.