views:

94

answers:

2

How can a progress bar be used as a seek bar???

Thanx

A: 

You should build a custom control for that.

There are tools to make this extremely easy. I don't want to do advertisement, but have a look at Opacity. There you can create vector drawings with paramters like one for the current progress value. And you can have this drawing exported as source code which will create a UIView or UIControl subclass (at your choice) that has a property to set the current progress.

At least that's the way I'd do this.

Max Seelemann
I disagree that a custom control is the right choice. There is a lot of subtlety to building custom controls. Avoid it if possible. Besides, the OP is likely trying to copy the iPod app UI and that uses a `UISlider` with a custom thumb image. !00% standard.
Justin
I didn't mean a custom look of that control but to rather create a custom implementation. If a control doesn't fit your need you should rather create a custom copy than modify it. Might easily lead you into private api or compatibility issues. If the `UISlider` sufficient however, I totally agree that this is the way to go!
Max Seelemann
+2  A: 

You want to use an UISlider. Update its position periodically according to the playing position. Adjust your playing position whenever the slider calls its action.

tob