---
title: "previewInteraction(_:didUpdatePreviewTransition:ended:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uipreviewinteractiondelegate/previewinteraction(_:didupdatepreviewtransition:ended:)"
---

# previewInteraction(_:didUpdatePreviewTransition:ended:)

Informs the delegate of the progress through the preview phase of the preview interaction.

## Declaration

```swift
func previewInteraction(_ previewInteraction: UIPreviewInteraction, didUpdatePreviewTransition transitionProgress: CGFloat, ended: Bool)
```

## Parameters

- `previewInteraction`: The preview interaction associated with the current user input.
- `transitionProgress`: The progress through the preview phase of the transition. A doc://com.apple.documentation/documentation/CoreFoundation/CGFloat-swift.struct with a value from 0 to 1.
- `ended`: A Boolean whose value indicates whether the preview phase of the transition is complete.

## Discussion

Discussion This method is called repeatedly during the preview phase of the preview interaction. Use the supplied transitionProgress parameter to update the UI to reflect the progress of the interaction. For example, the peek effect in view controller preview transitions progressively blurs everything except the appropriate view. The ended parameter is false throughout the preview phase and becomes true as the phase is completed. The preview interaction then transitions to the commit phase, so you should use this point to update the UI as required.

## See Also

### Managing preview interactions

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