Instance Property

height

Returns the height of a rectangle.

Declaration

var height: CGFloat { get }

Parameters

rect

The rectangle to examine.

Return Value

The height of the specified rectangle.

Discussion

Regardless of whether the height is stored in the CGRect data structure as a positive or negative number, this function returns the height as if the rectangle were standardized. That is, the result is never a negative number.

See Also

Calculated Geometric Properties

var width: CGFloat

Returns the width of a rectangle.

var minX: CGFloat

Returns the smallest value for the x-coordinate of the rectangle.

var midX: CGFloat

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

var maxX: CGFloat

Returns the largest value of the x-coordinate for the rectangle.

var minY: CGFloat

Returns the smallest value for the y-coordinate of the rectangle.

var midY: CGFloat

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

var maxY: CGFloat

Returns the largest value for the y-coordinate of the rectangle.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software