Instance Method

initWithCGRect:

Initializes a vector that is initialized with values provided by a CGRect structure.

Declaration

- (instancetype)initWithCGRect:(CGRect)r;

Parameters

r

A rect.

Discussion

The CGRect structure’s X, Y, height and width values are stored in the vector’s X, Y, Z and W properties.

See Also

Initializing a Vector

- initWithValues:count:

Initializes a vector with the provided values.

- initWithX:

Initializes the first position of a vector with the provided values.

- initWithX:Y:

Initializes the first two positions of a vector with the provided values.

- initWithX:Y:Z:

Initializes the first three positions of a vector with the provided values.

- initWithX:Y:Z:W:

Initializes four positions of a vector with the provided values.

- initWithString:

Initializes a vector with values provided in a string representation.

- initWithCGAffineTransform:

Initializes a vector that is initialized with values provided by a CGAffineTransform structure.

- initWithCGPoint:

Initializes a vector that is initialized with values provided by a CGPoint structure.