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