Where and how should I instantiate an object which will be used globally in an IOS app?

后端 未结 3 1296
你的背包
你的背包 2020-12-20 05:48

For simplicity\'s sake, lets say I am making a stopwatch application for ios5. I have a class called stopwatch, which represents the stopwatch\'s state. This class possesses

3条回答
  •  自闭症患者
    2020-12-20 06:50

    You can use Singleton pattern. look here for more info What should my Objective-C singleton look like?

提交回复
热议问题