|
|
|
|
|
by eluos
5045 days ago
|
|
I use these in objective C, I usually create a data object and stick the networking function in it as well. Some use core data, but I haven't found a need for it yet. static MySingleton *sharedSingleton; + (void)initialize
{
static BOOL initialized = NO;
if(!initialized)
{
initialized = YES;
sharedSingleton = [[MySingleton alloc] init];
}
} |
|