I have an error in a script I am writing, the error is:
Control reaches end of non-void function
This is my code:
-(BOOL) hasInternet {
Reachability *reach = [Reachability reachabilityWithHostName:@"www.google.co.uk"];
NetworkStatus internetStats = [reach currentReachabilityStatus];
if (internetStats == NotReachable){
UIAlertView *alertOne = [[UIAlertView alloc] initWithTitle:@"Internet" message:@"is DOWN" delegate:self cancelButtonTitle:@"Turn on your Internet" otherButtonTitles:@"Cancel",nil];
[alertOne show];
}
}
Can anyone see where I have gone wrong?