Type Method

vectorWithCGPoint:

Creates and returns a vector that is initialized with values provided by a CGPoint structure.

Declaration

+ (instancetype)vectorWithCGPoint:(CGPoint)p;

Parameters

p

A point.

Return Value

A vector initialized with the specified values.

Discussion

The CGPoint structure’s X and Y values are stored in the vector’s X and Y properties.

See Also

Creating a Vector

+ vectorWithValues:count:

Creates and returns a vector that is initialized with the specified values.

+ vectorWithX:

Creates and returns a vector that is initialized with one value.

+ vectorWithX:Y:

Creates and returns a vector that is initialized with two values.

+ vectorWithX:Y:Z:

Creates and returns a vector that is initialized with three values.

+ vectorWithX:Y:Z:W:

Creates and returns a vector that is initialized with four values.

+ vectorWithString:

Creates and returns a vector that is initialized with values provided in a string representation.

+ vectorWithCGAffineTransform:

Creates and returns a vector that is initialized with values provided by a CGAffineTransform structure.

+ vectorWithCGRect:

Creates and returns a vector that is initialized with values provided by a CGRect structure.