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.