<!--
{
  "availability" : [
    "iOS: 10.0.0 - 27.0.0",
    "iPadOS: 10.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIImpactFeedbackGenerator/init(style:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIImpactFeedbackGenerator(im)initWithStyle:"
  },
  "title" : "init(style:)"
}
-->

# init(style:)

Creates an impact feedback generator with the specified style.

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

## Parameters

`style`

A value representing the mass of the colliding objects. For a list of valid feedback styles, see the [`UIImpactFeedbackGenerator.FeedbackStyle`](/documentation/UIKit/UIImpactFeedbackGenerator/FeedbackStyle) enumeration.

## Return Value

A newly initialized feedback generator.

## Discussion

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

---

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)