Function

CGRectMake

Returns a rectangle with the specified coordinate and size values.

Declaration

CGRect CGRectMake(CGFloat x, CGFloat y, CGFloat width, CGFloat height);

Parameters

x

The x-coordinate of the rectangle’s origin point.

y

The y-coordinate of the rectangle’s origin point.

width

The width of the rectangle.

height

The height of the rectangle.

Return Value

A rectangle with the specified location and dimensions.

See Also

Creating a Geometric Primitive from Values

CGPointMake

Returns a point with the specified coordinates.

CGSizeMake

Returns a size with the specified dimension values.

CGVectorMake

Returns a vector with the specified dimension values.