UIImage extension to apply Sketch-style overlays to images. See the CGBlendMode
documentation for blending options (they match up with Sketch blending mode names).
Add UIImage+Overlay.swift
to your project, then call applyOverlayWithColor()
:
let image = UIImage(named: "MyImage")
let imageWithOverlay = image.applyOverlayWithColor(UIColor.blueColor(), blendMode: .Color, alpha: 0.5)
self.myImageview.image = imageWithOverlay