22 Apr

ImageViewWithMask

A Swift Playground that shows how to create a custom subclass of UIImageView with a circular mask layer on top.

You can download the working project from GitHub at this link: ImageViewWithMask.

The results of the masking look like this:

cropped image