Author
Travis Kirton


Border

Every view has a border, which by default is invisible. To reveal and style the border you can set the following properties.

width
color
radius

The border itself is actually a property, so you set the above like this:

view.border.width = 10.0

You can even copy an entire border between views:

shape.border = view.border

Example

let img = Image("chop")!
img.center = canvas.center
img.border.width = 10.0
img.border.color = C4Pink
canvas.add(img)