I have added music to my app so the music plays as soon as the app starts through the app delegate.
Now I have a switch in my app that I would like to rig up to where when it is switched off, the music stops playing, and when its switched back on, it resumes playing. Only problem is I don't know how to do this.
I know that I would need to make an IBAction and rig it to my switch but I am new to iOS Development and I learn best by being told how to do something and then applying it and seeing how it works in real time.
It would be great if someone could provide the code so I can throw it into my project and see how it works and learn from this.
Thanks.