I've created a UIProgressView
:
ProgressBar.frame = CGRect(x: 0, y: 0, width: width, height: height)
ProgressBar.center = ProgressPos
ProgressBar.trackImage = UIImage(named: "Ak")
ProgressBar.progress = 0.5
ProgressBar.transform = CGAffineTransformScale(ProgressBar.transform, 1, scale)
self.view?.addSubview(ProgressBar)
Now what I'm trying to do is, let say the progress bar is at 20%, then I want to show the first 20% of that image, I'll try to describe it with a picture:
But it isn't working, I'm not sure what code to use for that, can anybody help me out here?