I have done a singleton class called MyBgMusic.h & MyBgMusic.m. How to reference that singleton class to my SecondViewController or the rest of the XIB.
Here is
You have to import your class and reference it wherever you want using this line :
[[MyBgMusic sharedManager] toggleMusic]
If you want, you can add even property and reference it without create an instance of your class.
In SecondViewController you should call [[MyBgMusic sharedInstance] toggleMusic];
in the IBAction when you want to toggle music. Just as you used self.player
.
Create an IBAction in your SecondViewController hook up the xib then in code then have it call
[[MyBgMusic sharedInstance] toggleMusic];