I'm pretty sure it can be implemented wherever you need it.
All you have to do:
- Download the classes from here
- Add Reachability.h and Reachability.m to your project
- Add the SystemConfiguration framework
Then, wherever you want it...
Include it with:
#import "Reachability.h"
Write a method to call:
-(BOOL)reachable {
Reachability *r = [Reachability reachabilityWithHostName:@"enbr.co.cc"];
NetworkStatus internetStatus = [r currentReachabilityStatus];
if(internetStatus == NotReachable) {
return NO;
}
return YES;
}
Call it:
if ([self reachable]) {
NSLog(@"Reachable");
}
else {
NSLog(@"Not Reachable");
}