I know there are several threads on this, but none answer my questions.
I\'ve implemented my singleton class like this (being aware of the controversy about singleto
This works for me :
static DataModel *singleInstance; + (DataModel*)getInstance{ if (singleInstance == nil) { singleInstance = [[super alloc] init]; } return singleInstance; }
You can call it with
_model = [DataModel getInstance];