[Solved] Objective-C – iOS – Singleton explanation [closed]


The main difference between a Singleton and a Class with a bunch of Class methods is that the Singleton can preserve some kind of state. For example, an array of data or some boolean flags. By calling sharedInstance, you access to the one and only instance of this class, that is being kept alive(and the state of the data is preserved there). You can certainly add some class methods to your singleton class and they will work, but you will escape the Singleton pattern.

3

solved Objective-C – iOS – Singleton explanation [closed]