Enumeration

CGRectEdge

Coordinates that establish the edges of a rectangle.

Declaration

enum CGRectEdge : UInt32

Topics

Constants

case minXEdge

The minimum value for the x-coordinate of the rectangle. In macOS and iOS with the default coordinate system this is the left edge of the rectangle.

case minYEdge

The minimum value for the y-coordinate of the rectangle. In macOS with the default coordinate system this is the bottom edge of the rectangle. In iOS with the default coordinate system this is the top edge of the rectangle.

case maxXEdge

The maximum value for the x-coordinate of the rectangle. In macOS and iOS with the default coordinate system this is the right edge of the rectangle.

case maxYEdge

The maximum value for the y-coordinate of the rectangle. In macOS with the default coordinate system this is the top edge of the rectangle. In iOS with the default coordinate system this is the bottom edge of the rectangle.

See Also

Creating Derived Rectangles

var standardized: CGRect

Returns a rectangle with a positive width and height.

var integral: CGRect

Returns the smallest rectangle that results from converting the source rectangle values to integers.

func applying(CGAffineTransform) -> CGRect

Applies an affine transform to a rectangle.

func insetBy(dx: CGFloat, dy: CGFloat) -> CGRect

Returns a rectangle that is smaller or larger than the source rectangle, with the same center point.

func offsetBy(dx: CGFloat, dy: CGFloat) -> CGRect

Returns a rectangle with an origin that is offset from that of the source rectangle.

func union(CGRect) -> CGRect

Returns the smallest rectangle that contains the two source rectangles.

func intersection(CGRect) -> CGRect

Returns the intersection of two rectangles.

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