iOS : How to reference a music background from a singleton class?

前端 未结 3 1437
闹比i
闹比i 2020-12-22 08:53

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

3条回答
  •  盖世英雄少女心
    2020-12-22 09:25

    Create an IBAction in your SecondViewController hook up the xib then in code then have it call

    [[MyBgMusic sharedInstance] toggleMusic];
    

提交回复
热议问题