开发者

Build a nice progress bar

开发者 https://www.devze.com 2022-12-23 09:26 出处:网络
I need some inspiration on how to build a nice progress bar for the iPhone. What I want to build is a custom progress bar, as I\'ve drawn here:

I need some inspiration on how to build a nice progress bar for the iPhone. What I want to build is a custom progress bar, as I've drawn here:

alt text http://img.skitch.com/20100317-tf185nscpf41u1xp3s6fqbhux6.png

My approach up to now is to use a PNG (g开发者_JAVA百科ray in the figure above) with a transparent rounded rectangle. Through this rectangle, users see the moving bar. It would be nice to draw this bar with Quartz and give it a fancy animation (similar to the Mac OS X progress bars).

Any hints how to do this


you could use a couple nested UIViews and control the size of the childview and have different colors of backgrounds to show the progress or you could subclass the UIProgress bar like this example of the slide to unlock UISlider that has animation. The example is of a UISlider but the method used for animation could also be used on a progress bar without the difficulty of handling touches.

here is a link directly to the code from that discussion

0

精彩评论

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

关注公众号