Contents

CGRectGetMidX(_:)

Returns the x- coordinate that establishes the center of a rectangle.

Declaration

func CGRectGetMidX(_ rect: CGRect) -> CGFloat

Parameters

  • rect:

    The rectangle to examine.

Return Value

The x-coordinate of the center of the specified rectangle.

See Also

Getting Min, Mid, and Max Values