2

How would I get around this?

volumeSlider setValue:[musicPlayer volume]];

&

- (IBAction)volumeSliderChanged:(id)sender
{
    [musicPlayer setVolume:volumeSlider.value];
}

Where 'volume' and 'set volume' is deprecated in iOS 7.0. I've read this answer and this answer, but I was wondering if there's a simpler way? My app works perfectly fine but I'm afraid this error will cause problems elsewhere.

All I need is for the user to drag the slider I have or use the hardware buttons to adjust the volume.

Thanks, any help would be much appreciated.

Community
  • 1
  • 1
WunDaii
  • 2,322
  • 4
  • 18
  • 26

1 Answers1

0

I don't think its deprecated it doesn't say so in the class reference.. says available for ios7

enter image description here

Heres what I do when I need to adjust volume in ios7 with a slider..

[avPlayer setVolume:self.volumeSlider.value];

Slider action..

- (IBAction)volumeControl:(id)sender {

    UISlider *mySlider = sender;
    [avPlayer setVolume:mySlider.value];

}
4GetFullOf
  • 1,738
  • 4
  • 22
  • 47