---
title: "init(style:)"
framework: uikit
role: symbol
role_heading: Initializer
path: "uikit/uiimpactfeedbackgenerator/init(style:)"
---

# init(style:)

Creates an impact feedback generator with the specified style.

## Declaration

```swift
init(style: UIImpactFeedbackGenerator.FeedbackStyle)
```

## Parameters

- `style`: A value representing the mass of the colliding objects. For a list of valid feedback styles, see the doc://com.apple.uikit/documentation/UIKit/UIImpactFeedbackGenerator/FeedbackStyle enumeration.

## Return Value

Return Value A newly initialized feedback generator.

## Discussion

Discussion For more information on using feedback generators, see Using feedback generators.
