init(cornerRadius:)
Create a new rectangle with optionally rounded corners.
Declaration
init(cornerRadius: CGFloat? = nil)Parameters
- cornerRadius:
The corner radius in unit coordinate space (0.0 to 1.0). A value of
0.1represents 10% of the minimum dimension of the shape.If
nilthen this is a plain rectangle.