Contents

setAngle(_:magnitude:)

Sets the angle and magnitude of the gravity vector for the behavior.

Declaration

func setAngle(_ angle: CGFloat, magnitude: CGFloat)

Parameters

  • angle:

    The radian angle for the gravity vector, using standard UIKit geometry. Specify the value pi / 2 to create a force that pulls items downward toward the bottom of the reference view.

  • magnitude:

    The magnitude of the gravitational force. Specify 1.0 to get the standard UIKit gravity, which has an acceleration value of 1000 points / second².

See Also

Configuring a gravity behavior