Skip to content

Instantly share code, notes, and snippets.

@arzola
Created September 12, 2014 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arzola/f8cb48cd6775f39edc03 to your computer and use it in GitHub Desktop.
Save arzola/f8cb48cd6775f39edc03 to your computer and use it in GitHub Desktop.
Singleton Objetive C
+ (SPProgress *)sharedInstance {
static dispatch_once_t pred;
static SPProgress *shared = nil;
dispatch_once(&pred, ^{
shared = [[SPProgress alloc] init];
shared.eneArray = [[NSMutableArray alloc]init];
});
return shared;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment