Commit fdc5b537 authored by Jose Blaya's avatar Jose Blaya
Browse files

Update quick connect flags alpha value for highlight and normal modes

parent 67cf8926
......@@ -63,6 +63,19 @@ extension UIButton {
af_setImage(for: .normal, url: server.flagURL, placeholderImage: Asset.Flags.flagUniversal.image)
self.setImage(image.withRenderingMode(.alwaysOriginal), for: [])
let original = image.withRenderingMode(.alwaysOriginal)
self.setImage(original.image(alpha: 0.7), for: .normal)
self.setImage(image.withRenderingMode(.alwaysOriginal), for: .highlighted)
extension UIImage {
func image(alpha: CGFloat) -> UIImage? {
UIGraphicsBeginImageContextWithOptions(size, false, scale)
draw(at: .zero, blendMode: .normal, alpha: alpha)
let newImage = UIGraphicsGetImageFromCurrentImageContext()
return newImage
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment