Initializer

init(origin:size:)

Creates a rectangle with the specified origin and size.

Declaration

init(origin: CGPoint, size: CGSize)

See Also

Creating Rectangle Values

init(x: Double, y: Double, width: Double, height: Double)

Creates a rectangle with coordinates and dimensions specified as floating-point values.

init(x: Int, y: Int, width: Int, height: Int)

Creates a rectangle with coordinates and dimensions specified as integer values.

init(x: CGFloat, y: CGFloat, width: CGFloat, height: CGFloat)

Creates a rectangle with coordinates and dimensions specified as CGFloat values.