AuthorTravis Kirton
Tags views, masking, bounds
Particularly convenient when adding one view to another, setting the masksToBounds property will ensure that any visible contents outside of a view’s frame will be clipped.
masksToBounds
view.masksToBounds = true
let img = Image("chop")! img.center = canvas.center img.border.width = 10.0 img.border.color = C4Pink canvas.add(img)