<i id='vQ3e8'><tr id='vQ3e8'><dt id='vQ3e8'><q id='vQ3e8'><span id='vQ3e8'><b id='vQ3e8'><form id='vQ3e8'><ins id='vQ3e8'></ins><ul id='vQ3e8'></ul><sub id='vQ3e8'></sub></form><legend id='vQ3e8'></legend><bdo id='vQ3e8'><pre id='vQ3e8'><center id='vQ3e8'></center></pre></bdo></b><th id='vQ3e8'></th></span></q></dt></tr></i><div id='vQ3e8'><tfoot id='vQ3e8'></tfoot><dl id='vQ3e8'><fieldset id='vQ3e8'></fieldset></dl></div>
    <tfoot id='vQ3e8'></tfoot>
      <bdo id='vQ3e8'></bdo><ul id='vQ3e8'></ul>

    1. <small id='vQ3e8'></small><noframes id='vQ3e8'>

      1. <legend id='vQ3e8'><style id='vQ3e8'><dir id='vQ3e8'><q id='vQ3e8'></q></dir></style></legend>
      2. 如何检查设备是否有网络连接:cocos-2d

        How to check whether there is internet connection with the device: cocos-2d(如何检查设备是否有网络连接:cocos-2d)
              • <bdo id='w8Ikj'></bdo><ul id='w8Ikj'></ul>
                  <tbody id='w8Ikj'></tbody>
                <i id='w8Ikj'><tr id='w8Ikj'><dt id='w8Ikj'><q id='w8Ikj'><span id='w8Ikj'><b id='w8Ikj'><form id='w8Ikj'><ins id='w8Ikj'></ins><ul id='w8Ikj'></ul><sub id='w8Ikj'></sub></form><legend id='w8Ikj'></legend><bdo id='w8Ikj'><pre id='w8Ikj'><center id='w8Ikj'></center></pre></bdo></b><th id='w8Ikj'></th></span></q></dt></tr></i><div id='w8Ikj'><tfoot id='w8Ikj'></tfoot><dl id='w8Ikj'><fieldset id='w8Ikj'></fieldset></dl></div>

                <small id='w8Ikj'></small><noframes id='w8Ikj'>

                  <tfoot id='w8Ikj'></tfoot>
                • <legend id='w8Ikj'><style id='w8Ikj'><dir id='w8Ikj'><q id='w8Ikj'></q></dir></style></legend>
                  本文介绍了如何检查设备是否有网络连接:cocos-2d的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在我的一个 iPhone 应用程序中,我需要确定设备是否有互联网连接.有人帮忙吗?

                  In one of my iPhone app, I need to find out whether there is internet connection with the device or not. Anyone pls help?

                  推荐答案

                  使用 Reachability 类.

                  Use Reachability class.

                    if([self checkInternetConnected] ) 
                    {
                      NSLog(@"Internet connected
                  ");
                    } 
                  
                  
                  - (BOOL)checkInternetConnected 
                  {
                      Reachability *reachability = [Reachability reachabilityForInternetConnection];  
                      NetworkStatus networkStatus = [reachability currentReachabilityStatus]; 
                      return !(networkStatus == NotReachable);
                  }
                  

                  您可以在这里获得rechability类:下载示例 并将 Reachability.h 和 Reachability.m 添加到您的项目中.

                  You can get rechability class here : Download sample and add Reachability.h and Reachability.m into your project.

                  这篇关于如何检查设备是否有网络连接:cocos-2d的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                  Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)
                  Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))
                  Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)
                  Proper cocos2d scene restart?(正确的 cocos2d 场景重启?)
                  [ios.cocos2d+box2d]how to disable auto-rotation?([ios.cocos2d+box2d]如何禁用自动旋转?)
                    <tbody id='MGfje'></tbody>

                  <small id='MGfje'></small><noframes id='MGfje'>

                • <legend id='MGfje'><style id='MGfje'><dir id='MGfje'><q id='MGfje'></q></dir></style></legend>
                  <i id='MGfje'><tr id='MGfje'><dt id='MGfje'><q id='MGfje'><span id='MGfje'><b id='MGfje'><form id='MGfje'><ins id='MGfje'></ins><ul id='MGfje'></ul><sub id='MGfje'></sub></form><legend id='MGfje'></legend><bdo id='MGfje'><pre id='MGfje'><center id='MGfje'></center></pre></bdo></b><th id='MGfje'></th></span></q></dt></tr></i><div id='MGfje'><tfoot id='MGfje'></tfoot><dl id='MGfje'><fieldset id='MGfje'></fieldset></dl></div>
                  • <bdo id='MGfje'></bdo><ul id='MGfje'></ul>

                      <tfoot id='MGfje'></tfoot>