Instance Property

gravity

A vector that specifies the gravitational acceleration applied to physics bodies in the physics world.

Declaration

var gravity: CGVector { get set }

Discussion

The components of this property are measured in meters per second. The default value is (0.0,-9.8), which represent’s Earth’s gravity.

See Also

Configuring the Physics World

var speed: CGFloat

The rate at which the simulation executes.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software