Instance Property

isEmpty

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

Declaration

var isEmpty: Bool { get }

Parameters

rect

The rectangle to examine.

Return Value

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

Discussion

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.