<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIView/addMotionEffect(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIView(im)addMotionEffect:"
  },
  "title" : "addMotionEffect(_:)"
}
-->

# addMotionEffect(_:)

Begins applying a motion effect to the view.

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

## Parameters

`effect`

The motion effect.

## Discussion

The system animates the transition to the motion effect’s values using the present [`UIView`](/documentation/UIKit/UIView) animation context. The motion effect’s keyPath/value pairs are applied to the view’s presentation layer.

---

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)