A custom progress view that lets the user easily present a progress view with masked image containing an alpha channel (i.e PNG images). The progress view can be animated, can be customized foreground and background colors during animation.
maskedProgressView can be setup by programmatically:
let maskedImage = UIImage(named: "image.png")!
let maskedProgressView = maskedProgressView(withFrame:progressViewRect, maskingImage: maskedImage)
progressView.addSubview(maskedProgressView)
maskedProgressView exposed the following methods that let the user customize color, progress and animation timing:
- func setProgress(_ progress: CGFLoat, animated: Bool)
- func setProgress(_ progress: CGFloat)
- func setBackColor(_ color: UIColor)
- func setFrontColor(_ color: UIColor)
- func setAnimationTime(_ time: CGFloat)
'maskedProgressView' requires iOS 8.x or greater.
Usage is provided under the MIT License. See LICENSE for the full details.