我有这个代码:
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(reachabilityChanged:) name: kReachabilityChangedNotification object: nil];
hostReach = [Reachability reachabilityWithHostName: @"www.apple.com"];
[hostReach startNotifier];
- (void) reachabilityChanged: (NSNotification* )note{
Reachability* curReach = [note object];
NSParameterAssert([curReach isKindOfClass: [Reachability class]]);
}
我的问题是:如果 www.apple.com 不响应某些响应,会自动调用reachabilityChanged 函数吗?