//单例
+ (NetworkStatusMonitor *)ShareNetworkStatus{
if (_monitor != nil) {
return _monitor;
}
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_monitor = [[NetworkStatusMonitor alloc]init];
});
return _monitor;
}
+ (id)allocWithZone:(struct _NSZone *)zone
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
_monitor = [super allocWithZone:zone];
});
return _monitor;
}
- (id)copyWithZone:(NSZone *)zone
{
return _monitor;