An abstract superclass for defining motion-based modifiers for views.


@interface UIMotionEffect : NSObject


Subclasses of UIMotionEffect are responsible for defining the behavior to apply to a view when motion is detected. They do this by overriding the keyPathsAndRelativeValuesForViewerOffset: method and returning one or more key paths representing the view properties to modify.

Subclassing Notes

This class is abstract and cannot be instantiated directly. You can use the UIInterpolatingMotionEffect class to implement effects or you can subclass and implement your own effects. If you subclass, your subclass must conform to the NSCopying and NSCoding protocols and must implement the keyPathsAndRelativeValuesForViewerOffset: method.


Initializing a Motion Effect

- init

Initializes the motion effect to its default state.

Getting the Key Paths

- keyPathsAndRelativeValuesForViewerOffset:

For a given set of offset values, returns the view properties (and corresponding values) to update.


Inherits From

Conforms To