UIFeedbackGenerator
The abstract superclass for all feedback generators.
Declaration
@MainActor class UIFeedbackGeneratorOverview
Don’t subclass or create instances of this class yourself. Instead, instantiate one of the concrete feedback generator subclasses:
UIImpactFeedbackGenerator. Use impact feedback to indicate when an impact occurs. For example, you might trigger impact feedback when a user interface object collides with something or snaps into place.
UISelectionFeedbackGenerator. Use selection feedback to indicate a change in selection.
UINotificationFeedbackGenerator. Use notification feedback to indicate successes, failures, and warnings.
UICanvasFeedbackGenerator. Use canvas feedback to indicate when a drawing event occurs, such as an object snapping to a guide or ruler.
For more information, read Playing haptic feedback in your app.