This might be a bit confusing so if it is just comment and I will try and rephrase it.
I have 2 ViewControllers (ViewController and Page2ViewController). I have AVFoundation framework working and for an example this is what I'm doing:
//In ViewController.m
[PlaySound1 play];
[PlaySound2 play];
//In Page2ViewController.m
[PlaySound3 play];
[PlaySound4 play];
Each ViewController have a stop function like this:
-(void)Stop{
[PlaySound1 stop];
[PlaySound2 stop];
[PlaySound3 stop];
[PlaySound4 stop];
PlaySound1.currentTime = 0.0;
PlaySound2.currentTime = 0.0;
PlaySound3.currentTime = 0.0;
PlaySound4.currentTime = 0.0;
When you press a button it uses the stop function and plays the sound. My problem is each ViewController will only stop the tracks they hold. I've tried importing the ViewControllers into each other, I've tried copy all the codes to link them to the files into each ViewController but that doesn't work either.
Any ideas?
Thanks.