-1

I'm trying to create a circular progress indicator like Shazam. It will represent progress during recording. There will be a finite amount of time and I want it to react to the sound level like Shazam's does. Any clues where to begin?

Thanks

Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
Ward
  • 3,318
  • 3
  • 30
  • 50

2 Answers2

3

Subclass an UIView (maybe CircularProgress : UIView) and draw it manually with Quartz (paths, circles, etc) on the drawRect method passing the % of the progress as it changes.

emenegro
  • 6,901
  • 10
  • 45
  • 68
  • yeah, I was thinking of that, but I guess I'm trying to figure out how to make the radius grow as the volume increases. thanks. – Ward May 19 '10 at 14:18
0

I'm doing something similar here: https://github.com/DougFischer/DFCircleActivityIndicator

You can check my code and make something more appropriated. In my scenario, I'm drawing once and then I just rotate the image/layer. You'll need to animate the strokeEnd property using something like CABasicAnimation.

This property is animated and if you increase it from 0 to 1, you'll get the "filling effect". Again, in my scenario I need the empty center, probably you won't need it, your line width will be larger.

Douglas Fischer
  • 535
  • 4
  • 7