我有这段代码:
[[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不会响应某些resone,则会自动调用reachabilityChanged函数吗?