objective c - which is a better practice - global var or singleton? -


i'm confused - approach best in sharing data between scenes in cocos2d project. data consists of set of integer variables not constant. these should accessible throughout scenes.

as looked through web solution, found 2 basic approaches: 1) singleton 2) header file global variables declaration

my question goes: (and why) better in specific case?

the nearest topic found is- what better: global string or singleton? doesn't help.


Comments