Contents

angle

The direction of the gravity vector, expressed in radians in the reference coordinate system.

Declaration

var angle: CGFloat { get set }

Discussion

Modify this property when you want to change the angle of the gravity vector separately from the magnitude of that vector. The value in this property is tied to the value in the gravityDirection property, so changes in one affect the other.

The default angle is pi / 2 radians, which represents a downward force in the reference view. A value of 0 represents a force that moves items toward the right side of the reference view.

See Also

Configuring a gravity behavior