---
title: "addMotionEffect(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiview/addmotioneffect(_:)"
---

# addMotionEffect(_:)

Begins applying a motion effect to the view.

## Declaration

```swift
func addMotionEffect(_ effect: UIMotionEffect)
```

## Parameters

- `effect`: The motion effect.

## Discussion

Discussion The system animates the transition to the motion effect’s values using the present UIView animation context. The motion effect’s keyPath/value pairs are applied to the view’s presentation layer.

## See Also

### Using motion effects

- [motionEffects](uikit/uiview/motioneffects.md)
- [removeMotionEffect(_:)](uikit/uiview/removemotioneffect(_:).md)
