#pragma mark - 网络连接检查
- (void) currentReach
{
    //  网络检测
    Reachability *curReach = [Reachability reachabilityForInternetConnection];
    
    switch ([curReach currentReachabilityStatus]) {
        case NotReachable:
            
            [BlockView getToastWithContent: @"无法连接网络!" target: self.window];
            
            break;
        case ReachableViaWiFi:
            
            [BlockView getToastWithContent: @"Wifi已连接!" target: self.window];
            
            break;
        case ReachableViaWWAN:
            
            [BlockView getToastWithContent: @"3G上网中" target: self.window];
            
            break;
        default:
            break;
    }
    
}


posted on 2014-06-10 14:58  М80メ  阅读(165)  评论(0编辑  收藏  举报