I have an AVAudioPlayer,let's call it player1, that starts in a particular UIViewController, let's call it myController1. I set numberOfLoops to -1 so the audio loops indefinitely. I set up a protocol so that myController1 acts as delegate for the AVAudioPlayer, so that I can trigger audioPlayerDidFinishPlaying. I also wrote a routine to stop the player from within myController1. All of this works.
Suppose I have additional UIViewControllers, say, myController2 and myController3. I have combed the forums and Apple documentation, but I cannot find a way to stop the player from within either of these additional controllers. Is it possible? (I'm reluctant to believe it is not.) If so, can I get some hints?
I'm seventy years old, so when it comes to learning new things I'm sort of like an old dog. I programmed 8 and 16 bit chips for industrial process control in C for thirty years. Object oriented programming is a whole new ball of wax, but I'm having a ball learning.
Many thanks for any help.
Dan