---
title: "previewInteractionDidCancel(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uipreviewinteractiondelegate/previewinteractiondidcancel(_:)"
---

# previewInteractionDidCancel(_:)

Informs the delegate that the specified preview interaction was canceled.

## Declaration

```swift
func previewInteractionDidCancel(_ previewInteraction: UIPreviewInteraction)
```

## Parameters

- `previewInteraction`: The preview interaction associated with the current user input.

## Discussion

Discussion This method is called when the preview interaction is canceled, either programmatically through the cancel() method on UIPreviewInteraction, or by interrupting the preview interaction before the commit phase is complete.

## See Also

### Managing preview interactions

- [previewInteractionShouldBegin(_:)](uikit/uipreviewinteractiondelegate/previewinteractionshouldbegin(_:).md)
- [previewInteraction(_:didUpdatePreviewTransition:ended:)](uikit/uipreviewinteractiondelegate/previewinteraction(_:didupdatepreviewtransition:ended:).md)
- [previewInteraction(_:didUpdateCommitTransition:ended:)](uikit/uipreviewinteractiondelegate/previewinteraction(_:didupdatecommittransition:ended:).md)
