Giter Club home page Giter Club logo

fggreachability's Introduction

FGGReachability

基于Reachability封装的网络判断,很好用,可以判断2G,2.75G,3G,4G,Wi-Fi,及可用,不可用等状态
----------------------------------------------------
FGGReachability用法简介:
1.导入CoreTelephony.framework框架
2.导入#import <CoreTelephony/CTTelephonyNetworkInfo.h>
3.导入#import <CoreTelephony/CTCarrier.h>
4.获取当前网络状态:FGGNetWorkStatus status=[FGGReachability networkStatus];
5.作出判断
==>若status==FGGNetWorkStatus2G,则当前网络状态为2G;
==>若status==FGGNetWorkStatusEdge,则当前网络状态为2.75G(Edge);
==>若status==FGGNetWorkStatus3G,则当前网络状态为3G;
==>若status==FGGNetWorkStatus4G,则当前网络状态为4G;
==>若status==FGGNetWorkStatusWifi,则当前网络状态为wifi;
==>若status==FGGNetWorkStatusNotReachable,则当前网络状态为不可用;
==>若status!=FGGNetWorkStatusNotReachable,则当前网络状态可用(包含wifi和蜂窝移动网络)。
---------------------------------------------------
Copyright (c) 2015年 夏桂峰. All rights reserved.
---------------------------------------------------

fggreachability's People

Contributors

insfgg99x avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.