Created
September 12, 2014 17:11
-
-
Save arzola/f8cb48cd6775f39edc03 to your computer and use it in GitHub Desktop.
Singleton Objetive C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (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