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.

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