-2

When volume key changes,the slider in the view also changes according to the volume set using volume keys.

And when the slider is changed the device volume should set accordingly.

Referred Links this

But the app crashes rarely when changing slider value.

why is it so

Thankyou.

Community
  • 1
  • 1
Khushboo
  • 181
  • 1
  • 3
  • 13
  • Put your code here where app is getting crashes. else make a demo project and provide URL of dropbox or drive so anyone can download and provide you a solution. – Hasya Jul 13 '16 at 10:30
  • Please provide a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) – Luke Van In Jul 13 '16 at 11:08

1 Answers1

2

Essentially,all you have to do is to create an IBAction that is called whenever the slider value is changed and then base the slider's new value to the player's volume.

       yourPlayer.volume = yourSlider.value
Benn Tan
  • 107
  • 1
  • 7