- (void) networkReachabilityDidUpdate:(NetworkReachability*)reachability { [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(reachabilityChanged) object:nil]; [self performSelector:@selector(reachabilityChanged) withObject:nil afterDelay:0.1f]; } //cancelPreviousPerformRequestsWithTarget是终止上次performSelector的Delay调用 //上面例子是防止在afterDelay时间内重复调用reachabilityChanged
原文地址:http://blog.csdn.net/fucheng56/article/details/25591531