Global Function

roundedRect()

Declaration

roundedRect(rect: CGRect, xRadius: Double, yRadius: Double)

Parameters

rect A CGRect structure that defines the position and size of the rectangle.
xRadius X-axis dimension of the radius of corners.
yRadius Y-axis dimension of the radius of corners.

Returns

-

Description

Draws a rounded rectangle in the view. Round rects are everywhere!

Examples

let myRect = CGRect(x: 50, y: 80, width: 40, height: 40)
roundedRect(rect: myRect, xRadius: 5, yRadius: 5)

Related