---
title: "CGRectIsEmpty(_:)"
framework: coregraphics
role: symbol
role_heading: Function
path: "coregraphics/cgrectisempty(_:)"
---

# CGRectIsEmpty(_:)

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

## Declaration

```swift
func CGRectIsEmpty(_ rect: CGRect) -> Bool
```

## Parameters

- `rect`: The rectangle to examine.

## Return Value

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

## Discussion

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

## See Also

### Checking Rectangle Characteristics

- [CGRectIsNull(_:)](coregraphics/cgrectisnull(_:).md)
- [CGRectIsInfinite(_:)](coregraphics/cgrectisinfinite(_:).md)
