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

# init(events:parameters:)

Constructs a haptic pattern from a series of events and parameters.

## Declaration

```swift
init(events: [CHHapticEvent], parameters: [CHHapticDynamicParameter]) throws
```

## Parameters

- `events`: An array of events that make up the haptic pattern.
- `parameters`: An array of dynamic parameters that define how the haptic pattern’s parameters change over time.

## See Also

### Creating a Haptic Pattern

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