Question

enter image description here

My objective is to make ProgressView border colored like with green, red etc as mentioned in above screenshot.

I am using Custom classes provided by this url. But there is no such border coloring format provided there http://pwiddershoven.nl/blog/2009/01/04/colored-uiprogressview.html

Developer's please suggest

Thanks

Was it helpful?

Solution

You cannot change default progress bar background

OTHER TIPS

Progress.layer.borderWidth = 0.3;
Progress.layer.borderColor = [[UIColor redColor] CGColor];

The class you're using doesn't support it. Obviously the guy who made it (very generous of him, BTW. It's beautiful. I'm using it in my next app.) didn't need it in his app.

You have two options now:

  1. Write code yourself/hope someone else here does that will do more custom drawing and allow you to set a separate border color. For someone with experience in the matter, it'd probably be a five minute job. I can say that I have never needed to use graphics contexts etc, so I can't help you there.

  2. You could also email him and ask if he could extend the class. If you donated twenty bucks to him, he'd probably be more inclined to do it.

The source code with the original drawing code is here: https://github.com/PascalW/PDColoredProgressview/blob/master/PDColoredProgressView.m

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top