IOS单例

+(instancetype)sharedManager{
    static PhotoMeanager *instance = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken,^{
        instance = [[PhotoMeanager alloc]init];
    });
    return instance;
}

你可能感兴趣的:(IOS单例)