主线程刷新UI
dispatch_async(dispatch_get_main_queue(), ^{
///
});
单例
static Tools *_sharedManger; @implementation Tools + (SingleTools *)sharedManger{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
if (!_sharedManger) {
_sharedManger = [[Tools alloc]init];
} });
return _sharedManger;
}
@end