开发者

How to change ProgressView borderColor

How to change ProgressView borderColor

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 borde开发者_如何学Cr coloring format provided there http://pwiddershoven.nl/blog/2009/01/04/colored-uiprogressview.html

Developer's please suggest

Thanks


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


You cannot change default progress bar background

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜