[iPhone] Change color of progress bar?

Hi,

I am currently trying to change the background color of a UIProgressView from the default blue to red. Is it possible to change to color?

Sorry for asking for help on such as simple problem but I have looked through the documentation and tried setColor: - but had no luck with either of them.

Thanks for any help, I really appreciate it.

Anthony

Mac OS X (10.5.4)

Posted on Sep 1, 2008 8:59 AM

Reply
5 replies

Sep 1, 2008 4:49 PM in response to Ascon

I guess the lack of answers means that there is no way to programmatically change the color of the progress bar.

Im not sure how the integrated frameworks/classes work, but is the standard blue bar image stored in one of the framework bundles and if so is it possible to edit that in photoshop to a red color?

Sep 1, 2008 6:34 PM in response to Ascon

The lack of answer could be for several reasons - it's only been 8 hours since you asked your question. Or maybe because it is a national holiday in the USA (don't know where you are from) so less people are around the board today. Or maybe no one has ever tried to do what you are doing.

Anyway - to help with your question...

It does appear that the progress view is terribly unconfigurable. Strange when you compare it to the nearly identical UISlider.

What I suggest is to use a UISlider instead of the UIProgressView. Look at the UICatalog example - there is a customized slider there. You want to do the same basic thing. Create the min and max images. But here's the trick - use a simple, fully transparent image for the thumb. You should also disable user interaction on the slider to avoid the user changing the progress by tapping on it.

I haven't tried this idea but it should work. I'm using a fully customized slider in my current app so I know in theory this should work.

Let me know.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

[iPhone] Change color of progress bar?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.