Structure

CGVector

A structure that contains a two-dimensional vector.

Declaration

struct CGVector

Topics

Special Values

static var zero: CGVector

The vector whose components are both zero.

init()

Creates a vector whose components are both zero.

Geometric Properties

var dx: CGFloat

The x component of the vector.

var dy: CGFloat

The y component of the vector.

Initializers

init(dx: Double, dy: Double)

Creates a vector with components specified as floating-point values.

init(dx: CGFloat, dy: CGFloat)

Creates a vector with components specified as CGFloat values.

init(dx: Int, dy: Int)

Creates a vector with components specified as integer values.

Instance Properties

Instance Methods

See Also

Geometric Data Types

struct CGFloat

The basic type for floating-point scalar values in Core Graphics and related frameworks.

struct CGPoint

A structure that contains a point in a two-dimensional coordinate system.

struct CGSize

A structure that contains width and height values.

struct CGRect

A structure that contains the location and dimensions of a rectangle.

struct CGAffineTransform

An affine transformation matrix for use in drawing 2D graphics.

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