---
title: "CGRectGetMidY(_:)"
framework: coregraphics
role: symbol
role_heading: Function
path: "coregraphics/cgrectgetmidy(_:)"
---

# CGRectGetMidY(_:)

Returns the y-coordinate that establishes the center of the rectangle.

## Declaration

```swift
func CGRectGetMidY(_ rect: CGRect) -> CGFloat
```

## Parameters

- `rect`: The rectangle to examine.

## Return Value

Return Value The y-coordinate of the center of the specified rectangle.

## See Also

### Getting Min, Mid, and Max Values

- [CGRectGetMinX(_:)](coregraphics/cgrectgetminx(_:).md)
- [CGRectGetMinY(_:)](coregraphics/cgrectgetminy(_:).md)
- [CGRectGetMidX(_:)](coregraphics/cgrectgetmidx(_:).md)
- [CGRectGetMaxX(_:)](coregraphics/cgrectgetmaxx(_:).md)
- [CGRectGetMaxY(_:)](coregraphics/cgrectgetmaxy(_:).md)
