I'm using SCListener to get the iPhone's volume, but I'd like to put an observer on the volume. So when it changes I can update the volume meter on the screen. But doing something like:
SCListener *listener = [SCListener sharedListener];
[listener addObserver:self
forKeyPath:@"peakPower"
options:NSKeyValueObservingOptionOld
context:NULL];
doesn't do the trick because peakPower isn't a variable. How would I put an observer on the function? Or how would a create a listener I could stop and start to keep track of the peak power in a variable I could put an observer on?
Thanks in advance for the help!