<!--
{
  "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/UIInterpolatingMotionEffect",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIInterpolatingMotionEffect"
  },
  "title" : "UIInterpolatingMotionEffect"
}
-->

# UIInterpolatingMotionEffect

An object that maps the horizontal or vertical tilt of a device to values that you specify so that UIKit can apply those values to your views.

```
@MainActor class UIInterpolatingMotionEffect
```

## Overview

You use this class to determine the amount of tilt along a single axis to apply to a view. After creating an instance of this class, you must assign appropriate values to the [`minimumRelativeValue`](/documentation/UIKit/UIInterpolatingMotionEffect/minimumRelativeValue) and [`maximumRelativeValue`](/documentation/UIKit/UIInterpolatingMotionEffect/maximumRelativeValue) properties. As the user moves the device, the motion effect object translates the fixed offset values returned by the system (which are in the range `-1` to `1`) to the range of values you specified. UIKit then applies the translated values to any target views.

## Topics

### Initializing a motion effect

[`-  initWithKeyPath:type:`](/documentation/UIKit/UIInterpolatingMotionEffect/init(keyPath:type:))

Initializes and returns an interpolating motion effect object configured for the specific tilt direction.

[`-  initWithCoder:`](/documentation/UIKit/UIInterpolatingMotionEffect/init(coder:))

Creates a motion effect from data in an unarchiver.

### Accessing the motion attributes

[`keyPath`](/documentation/UIKit/UIInterpolatingMotionEffect/keyPath)

The key path you want to modify on the view.

[`type`](/documentation/UIKit/UIInterpolatingMotionEffect/type)

The tilt direction to monitor.

[`minimumRelativeValue`](/documentation/UIKit/UIInterpolatingMotionEffect/minimumRelativeValue)

The value that maps to the minimum viewer offset.

[`maximumRelativeValue`](/documentation/UIKit/UIInterpolatingMotionEffect/maximumRelativeValue)

The value that maps to the maximum viewer offset.

### Constants

[`EffectType`](/documentation/UIKit/UIInterpolatingMotionEffect/EffectType)

The axis to use when interpolating values.

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Equatable`](/documentation/Swift/Equatable)

### Inherits From

[`UIMotionEffect`](/documentation/UIKit/UIMotionEffect)

---

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)