Hello,
I've got a nib with two views. The classes for these views are "OfflineMusicViewController.h" (and .m), and PlayingView.h (and .m). In the main view of the xib (OfflineMusicView), there's a button that is supposed to a) start playing a music file (w/ AVFoundation), and b) switch to a new view in the same xib (PlayingView) that has a button that stops the music and closes the second view, going back to the first. I've got the AVAudioPlayer (theAudio) in OfflineMusicViewController.h, but I need to use "[theAudio stop];" in PlayingView.m. How can I give theAudio a command from a different class file?
I've got a nib with two views. The classes for these views are "OfflineMusicViewController.h" (and .m), and PlayingView.h (and .m). In the main view of the xib (OfflineMusicView), there's a button that is supposed to a) start playing a music file (w/ AVFoundation), and b) switch to a new view in the same xib (PlayingView) that has a button that stops the music and closes the second view, going back to the first. I've got the AVAudioPlayer (theAudio) in OfflineMusicViewController.h, but I need to use "[theAudio stop];" in PlayingView.m. How can I give theAudio a command from a different class file?