How to set the alpha of an UIImage in SWIFT programmatically?
Luckily I was able to help myself and would like to share with you my solution: Swift 3 // UIImage+Alpha.swift extension UIImage { func alpha(_ value:CGFloat) -> UIImage { UIGraphicsBeginImageContextWithOptions(size, false, scale) draw(at: CGPoint.zero, blendMode: .normal, alpha: value) let newImage = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() return newImage! } } The above new Swift extension I added to … Read more