UIMotionEffectGroup class manages a collection of motion effects that you want to apply to a view at the same time. This class behaves similarly to the
CAAnimationGroup class in Core Animation. The key paths and values returned by each motion effect object are applied simultaneously and with the same timing.
Because this class is a subclass of
UIMotionEffect, you can treat it like a single motion effect in your code. After setting a value for the
motionEffects property, add the group object to one or more of your views.
An array of motion effect objects to apply as a group to the view.
var motionEffects: [UIMotionEffect]?
@property(copy, nonatomic, nullable) NSArray <__kindof UIMotionEffect *> *motionEffects
The array contains one or more
UIMotionEffectobjects. When the viewer offset changes, each object in the group is asked for its key paths and updated values. Those values are then applied simultaneously.
Available in iOS 7.0 and later.