---
title: "performFeedback(_:performanceTime:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsalignmentfeedbackfilter/performfeedback(_:performancetime:)"
---

# performFeedback(_:performanceTime:)

Performs the haptic feedback described by one or more alignment feedback tokens.

## Declaration

```swift
func performFeedback(_ alignmentFeedbackTokens: [any NSAlignmentFeedbackToken], performanceTime: NSHapticFeedbackManager.PerformanceTime)
```

## Parameters

- `alignmentFeedbackTokens`: One or more feedback tokens prepared for specific alignment locations by calling doc://com.apple.appkit/documentation/AppKit/NSAlignmentFeedbackFilter/alignmentFeedbackTokenForMovement(in:previousPoint:alignedPoint:defaultPoint:), doc://com.apple.appkit/documentation/AppKit/NSAlignmentFeedbackFilter/alignmentFeedbackTokenForHorizontalMovement(in:previousX:alignedX:defaultX:), or doc://com.apple.appkit/documentation/AppKit/NSAlignmentFeedbackFilter/alignmentFeedbackTokenForVerticalMovement(in:previousY:alignedY:defaultY:). Typically, no more than one feedback token per dimension (horizontal/vertical) should be provided.
- `performanceTime`: The time, of type NSHapticFeedbackPerformanceTime, when the feedback should be provided to the user.

## Discussion

Discussion Call this method to initiate haptic feedback to the user. Pass it one or more alignment feedback tokens of type NSAlignmentFeedbackToken and a time to execute of type NSHapticFeedbackPerformanceTime. Call this method immediately before moving the object to its new aligned position.

## See Also

### Related Documentation

- [NSHapticFeedbackPerformer](appkit/nshapticfeedbackperformer.md)
- [NSHapticFeedbackManager.PerformanceTime](appkit/nshapticfeedbackmanager/performancetime.md)
