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
// 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
相关文章推荐
- iOS UI 21 单例中的线程
- iOS UI 21 线程
- iOS UI 21 线程
- iOS UI 21 动画
- iOS UI 21 动画
- iOS UI 20 音乐播放器
- iOS UI 20 音乐播放器
- iOS UI 18 uicollectionview和自定义cell
- iOS UI 18 uicollectionview和自定义cell
- iOS UI 18 数据库
- iOS UI 18 数据库
- iOS UI 17 初级数据持久化
- iOS UI 17 初级数据持久化
- iOS UI 16 图片加载第三方 SDwebimage
- iOS UI 16 图片加载第三方 SDwebimage
- Paceman: required key missing from keyring 解决方案
- UITableViewCell 高度的自适应
- iOS UI 12 tabbarcontroller
- iOS UI 12 tabbarcontroller
- iOS UI 12 block传值