---
title: "init(dictionary:)"
framework: corehaptics
role: symbol
role_heading: Initializer
path: "corehaptics/chhapticpattern/init(dictionary:)"
---

# init(dictionary:)

Creates a haptic pattern from a property list dictionary.

## Declaration

```swift
init(dictionary patternDict: [CHHapticPattern.Key : Any]) throws
```

## Parameters

- `patternDict`: A dictionary that defines the haptic pattern and its parameters.

## See Also

### Creating a Haptic Pattern

- [init(contentsOf:)](corehaptics/chhapticpattern/init(contentsof:).md)
- [init(events:parameterCurves:)](corehaptics/chhapticpattern/init(events:parametercurves:).md)
- [init(events:parameters:)](corehaptics/chhapticpattern/init(events:parameters:).md)
- [CHHapticPattern.Key](corehaptics/chhapticpattern/key.md)
