<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSAlignmentFeedbackFilter/performFeedback(_:performanceTime:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSAlignmentFeedbackFilter(im)performFeedback:performanceTime:"
  },
  "title" : "performFeedback(_:performanceTime:)"
}
-->

# performFeedback(_:performanceTime:)

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

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

## Parameters

`alignmentFeedbackTokens`

One or more feedback tokens prepared for specific alignment locations by calling [`alignmentFeedbackTokenForMovement(in:previousPoint:alignedPoint:defaultPoint:)`](/documentation/AppKit/NSAlignmentFeedbackFilter/alignmentFeedbackTokenForMovement(in:previousPoint:alignedPoint:defaultPoint:)), [`alignmentFeedbackTokenForHorizontalMovement(in:previousX:alignedX:defaultX:)`](/documentation/AppKit/NSAlignmentFeedbackFilter/alignmentFeedbackTokenForHorizontalMovement(in:previousX:alignedX:defaultX:)), or [`alignmentFeedbackTokenForVerticalMovement(in:previousY:alignedY:defaultY:)`](/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

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

[`NSHapticFeedbackPerformer`](/documentation/AppKit/NSHapticFeedbackPerformer)

A set of methods and constants that a haptic feedback performer implements.

[`PerformanceTime`](/documentation/AppKit/NSHapticFeedbackManager/PerformanceTime)

A time at which to provide haptic feedback to the user.



---

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)