0
我在的applicationDidFinishLaunching檢查網絡的可達性:申請未能及時啓動,即使有後臺線程
[self performSelectorInBackground:@selector(performReachabilityCheck) withObject:nil];
後臺線程
-(void)performReachabilityCheck{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
internetReach = [[Reachability reachabilityForInternetConnection] retain];
[internetReach startNotifer];
[self updateInterfaceWithReachability: internetReach];
[pool release]; pool = nil;
}
我不知道爲什麼我的應用程序啓動失敗及時?
這樣做的另一種方法:http://stackoverflow.com/questions/1083701/how-to-check-for-an-active-internet-connection-on-iphone-sdk/3597085#3597085 – iwasrobbed 2010-10-20 19:03:31