Contents

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.

Declaration

@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 and 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

Accessing the motion attributes

Constants

See Also

View-based effects