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 / 2to create a force that pulls items downward toward the bottom of the reference view. - magnitude:
The magnitude of the gravitational force. Specify
1.0to get the standard UIKit gravity, which has an acceleration value of 1000 points / second².