Translate

Sunday, September 23, 2012

Check internet available or not


We have to add Reachability Class 

    Reachability *reach=[[Reachability reachabilityForInternetConnection]retain];
    NetworkStatus status=[reach currentReachabilityStatus];
    bool success=[NetWorkInfo stringFromStatus:status];
    [reach release];
    if (success){
        [self loadPage];
    }
    else
    {
        [self alertMsg];
    }


No comments:

Post a Comment