How to make an UIImageView with another one in swift.

In swift we can mask an UIImageView with another one like this.

let maskImage = UIImage(named: “maskA”)
//Temporaly UIImageView
let mask = UIImageView(frame: CGRect(x: 0, y: 0, width: maskImage.size.width, height: maskImage.size.height))
mask.image = maskImage
mask.contentMode = .scaleToFill
originalImageView.mask = mask
Youtube URL

Leave a Reply

Your email address will not be published. Required fields are marked *