Class

UIImpactFeedbackGenerator

A concrete UIFeedbackGenerator subclass that creates haptics to simulate physical impacts.

Declaration

class UIImpactFeedbackGenerator : UIFeedbackGenerator

Overview

Use impact feedback to indicate that an impact has occurred. For example, you might trigger impact feedback when a user interface object collides with another object or snaps into place.

For more information, see Using Feedback Generators.

Topics

Initializing the Feedback Generator

init(style: UIImpactFeedbackGenerator.FeedbackStyle)

Returns a newly initialized feedback generator.

enum UIImpactFeedbackGenerator.FeedbackStyle

The mass of the objects in the collision simulated by a UIImpactFeedbackGenerator object.

Reporting Impacts

func impactOccurred()

Triggers impact feedback.

Relationships

Inherits From

Conforms To

See Also

Haptic Feedback

class UIFeedbackGenerator

The abstract superclass for all feedback generators.

class UINotificationFeedbackGenerator

A concrete UIFeedbackGenerator subclass that creates haptics to communicate successes, failures, and warnings.

class UISelectionFeedbackGenerator

A concrete UIFeedbackGenerator subclass that creates haptics to indicate a change in selection.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software