I’m using iOS 5, and I’ve been searching and haven’t found if I can make a thick progress bar using UIProgressView with UIImage. How do I use a small .png file and basically stretch it out with UIProgressView so that it looks like a progress bar or is it possible? Is it possible to make that .png tall, or is it going to be restricted to how tall UIProgressView is? Thanks in advance for your help!
Share
I have found out how to do it. First put a UIProgressView in the on the iPhone screen. I put mine at x:86 y:272. I hooked it up to the view controller’s .h file, named it progView, and @synthesized it in the .m file. I put the following code in the ViewDidLoad method:
This takes the image and stretches it from the middle, preserving pixels on each side. The width of the image must be changed using an image editor though. I don’t think it’s possible to stretch the width.
progBar.png:


trackBar.png: