01-04-2009 03:43:36
A little while ago, I found myself in the position of needing a UIProgressView in a color different then the default blue. I was suprised to find out that the UIProgressView class does not support setting a tintcolor.
So I decided to subclass UIProgressView and draw my own ProgressView with support for setting a tintcolor.
The result became 'PDColoredProgressView'.
progressView = [[PDColoredProgressView alloc] initWithProgressViewStyle: UIProgressViewStyleDefault]; [progressView setTintColor: [UIColor redColor]]; //or any other color you like [self.view addSubview: progressView];
Comments:
schmapdy 03-13-2009 03:25:03
GOOBER 04-07-2009 11:46:43
mfu 04-07-2009 21:06:44
Thank you for sharing.
James Bull 05-06-2009 09:01:53
mushfique 05-08-2009 10:39:07
slavik 05-23-2009 00:51:16
Is any way to make it vertical?
P-development 05-24-2009 17:59:24
You can make it vertical by setting the transform property like this:
progressView.transform = CGAffineTransformMakeRotation(M_PI / 2);
This applies to all UIView subclasses, not just this one.
mcp 05-25-2009 03:17:29
CJ 10-20-2009 14:10:11
Dustin Bachrach 10-29-2009 21:58:55
Supernico 11-06-2009 15:04:25
KH 12-06-2009 22:49:55
Hopefully Apple will add such a method in future updates of the SDK, seems like a silly thing for UIProgressView not to support!
Mike 12-09-2009 16:26:24
atrane 12-18-2009 09:30:27
Hilton 01-04-2010 18:41:59
iSkythe 01-05-2010 06:18:38
iSkythe 01-05-2010 06:19:10
Chris 01-07-2010 15:24:37
kalharri 01-11-2010 21:44:42
jz 01-20-2010 01:37:46
Speed007 01-22-2010 17:05:32
Gangadhar 02-02-2010 09:42:14
P-development 02-10-2010 11:55:25
To everyone: thanks for your replies. It's nice to see it's useful to you.
Neha 02-23-2010 17:10:30
bmasters 04-07-2010 21:05:39
o.lee 05-10-2010 13:21:16
Nivek 05-19-2010 19:41:32
Anthony 06-20-2010 03:05:18
Joel 06-20-2010 17:13:55
P-development 06-20-2010 21:04:06
Not off an UIProgressView. Off PDColoredProgressView you can by just changing the height member of the frame property.
Dimi 07-02-2010 11:11:51
Do u know how to make just plain ProgressView. I mean I don't need 3D.
Thanks a lots for in advance!
P-development 07-02-2010 12:40:27
adam 07-26-2010 10:27:54
Leave a comment