---
title: "addAnimation(_:)"
framework: storekit
role: symbol
role_heading: Instance Method
path: "storekit/skoverlay/transitioncontext/addanimation(_:)"
---

# addAnimation(_:)

Adds a closure you can use to animate view properties.

## Declaration

```swift
func addAnimation(_ block: @escaping () -> Void)
```

## Parameters

- `block`: A closure that sets animatable view properties and runs on the main thread.

## See Also

### Adding an Animation

- [startFrame](storekit/skoverlay/transitioncontext/startframe.md)
- [endFrame](storekit/skoverlay/transitioncontext/endframe.md)
