Function

CGRectIsEmpty

Returns whether a rectangle has zero width or height, or is a null rectangle.

Declaration

bool CGRectIsEmpty(CGRect rect);

Parameters

rect

The rectangle to examine.

Return Value

YES if the specified rectangle is empty; otherwise, NO.

Discussion

An empty rectangle is either a null rectangle or a valid rectangle with zero height or width.

See Also

Checking Rectangle Characteristics

CGRectIsNull

Returns whether the rectangle is equal to the null rectangle.

CGRectIsInfinite

Returns whether a rectangle is infinite.