I am trying to merge two different images and create a new one. This is the way I would like to do: I have this image (A):
It\'s a PNG image and I would like to mer
This way the overlay picture will be much cleaner
class func mergeImages(imageView: UIImageView) -> UIImage {
UIGraphicsBeginImageContextWithOptions(imageView.frame.size, false, 0.0)
imageView.superview!.layer.renderInContext(UIGraphicsGetCurrentContext()!)
let image = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
return image
}