您的位置:首页 > 产品设计 > UI/UE

iOS UI 21 单例中的线程

2015-12-13 16:37 344 查看
//

// Datahandle.h

// Ui - 21 线程

//

// Created by dllo on 15/12/9.

// Copyright (c) 2015年 dllo. All rights reserved.

//

#import <Foundation/Foundation.h>

@interface Datahandle :
NSObject

+(instancetype)datahandlesharedata;

@end

//

// Datahandle.m

// Ui - 21 线程

//

// Created by dllo on 15/12/9.

// Copyright (c) 2015年 dllo. All rights reserved.

//

#import "Datahandle.h"

@implementation Datahandle

+(instancetype)datahandlesharedata

{

static Datahandle *Data =
nil;

if (nil == Data) {

Data = [[Datahandle
alloc]init];

}

dispatch_once_t once = 0;

dispatch_once(&once, ^{

Data = [[Datahandle
alloc]init];

});

return Data;

}

@end
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: