Class

CHHapticParameterCurve

A curve that you send to a haptic pattern player to alter a property value gradually during playback.

Declaration

class CHHapticParameterCurve : NSObject

Overview

Parameter curves serve the same purpose as dynamic parameters in that they alter a property value during playback. Unlike dynamic parameters, which change a property value instantaneously, parameter curves interpolate linearly between parameter values to ensure a smooth transition.

A rising blue line represents how a parameter curve changes the parameter's value gradually over time, while an orange line shows how dynamic parameters change the parameter's value immediately.

For example, a parameter curve for haptic intensity modulates the intensity over time, ensuring a smooth transition between the current intensity and the upcoming one. Parameter curves apply to all events in a pattern; it isn't possible to apply one to only a single event.

Topics

Creating a Curve

class CHHapticParameterCurve.ControlPoint

A single control point in a parameter curve.

Describing the Curve

var controlPoints: [CHHapticParameterCurve.ControlPoint]

An array containing the curve's control points.

var parameterID: CHHapticDynamicParameter.ID

The parameter ID defining the type of parameter that the curve represents.

var relativeTime: TimeInterval

The time at which this parameter curve is applied, relative to the start time of the pattern.

Relationships

Inherits From

Conforms To

See Also

Programmatic Haptics

Playing Collision-Based Haptic Patterns

Play a custom haptic pattern whose strength depends on an object’s collision speed.

Updating Continuous and Transient Haptic Parameters in Real Time

Generate continuous and transient haptic patterns in response to user touch.

class CHHapticEvent

An object that describes a single haptic or audio event.

Beta
class CHHapticEventParameter

A static parameter value that represents a single property of the haptic pattern.

Beta
class CHHapticDynamicParameter

A value that you send to a haptic pattern player to alter a property value during playback.

Beta

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