Instance Property


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


var isEmpty: Bool { get }



The rectangle to examine.

Return Value

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


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

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 isInfinite: Bool

Returns whether a rectangle is infinite.

var isNull: Bool

Returns whether the rectangle is equal to the null rectangle.