Instance Property


Returns whether the rectangle is equal to the null rectangle.


var isNull: Bool { get }



The rectangle to examine.

Return Value

true if the specified rectangle is null; otherwise, false.


A null rectangle is the equivalent of an empty set. For example, the result of intersecting two disjoint rectangles is a null rectangle. A null rectangle cannot be drawn and interacts with other rectangles in special ways.

See Also

Checking Characteristics

func intersects(CGRect) -> Bool

Returns whether two rectangles intersect.

func contains(CGPoint) -> Bool

Returns whether a rectangle contains a specified point.

func contains(CGRect) -> Bool

Returns whether the first rectangle contains the second rectangle.

var isEmpty: Bool

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

var isInfinite: Bool

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