Function

CGRectEqualToRect

Returns whether two rectangles are equal in size and position.

Declaration

bool CGRectEqualToRect(CGRect rect1, CGRect rect2);

Parameters

rect1

The first rectangle to examine.

rect2

The second rectangle to examine.

Return Value

YES if the two specified rectangles have equal size and origin values, or if both rectangles are null rectangles. Otherwise, NO.

See Also

Comparing Values

CGPointEqualToPoint

Returns whether two points are equal.

CGSizeEqualToSize

Returns whether two sizes are equal.

CGRectIntersectsRect

Returns whether two rectangles intersect.

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