commit
0b2327f6e3
@ -31,7 +31,7 @@ static bool isFirstAccess = YES;
|
||||
dispatch_once(&onceToken, ^{
|
||||
isFirstAccess = NO;
|
||||
|
||||
SINGLETON = [[super allocWithZone:NULL] init];
|
||||
SINGLETON = [[super allocWithZone:NULL] initForCurrentUser];
|
||||
});
|
||||
|
||||
return SINGLETON;
|
||||
@ -39,21 +39,6 @@ static bool isFirstAccess = YES;
|
||||
|
||||
#pragma mark - Life Cycle
|
||||
|
||||
+ (instancetype) allocWithZone:(NSZone *)zone
|
||||
{
|
||||
return [self currentUser];
|
||||
}
|
||||
|
||||
+ (instancetype)copyWithZone:(struct _NSZone *)zone
|
||||
{
|
||||
return [self currentUser];
|
||||
}
|
||||
|
||||
+ (instancetype)mutableCopyWithZone:(struct _NSZone *)zone
|
||||
{
|
||||
return [self currentUser];
|
||||
}
|
||||
|
||||
- (instancetype)copy
|
||||
{
|
||||
return [[PNUser alloc] init];
|
||||
@ -64,7 +49,7 @@ static bool isFirstAccess = YES;
|
||||
return [[PNUser alloc] init];
|
||||
}
|
||||
|
||||
- (id) init
|
||||
- (instancetype) initForCurrentUser
|
||||
{
|
||||
if(SINGLETON){
|
||||
return SINGLETON;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user