IOS checks whether the network exists

Source: Internet
Author: User

Many IOSProgramYou need to connect to the network. The program connecting to the network needs to determine whether the current network of the device is normal. The following provides a very simple network detectionCode:

You only need to implement some code to determine whether the network exists. If it does not exist, the pop-up box is displayed, such:

Implementation process:

The following four classes are required:

Then add the systemconfiguration. Framework control.

Finally, add the following code to the location to be determined.

[Checknetwork isexistencenetwork]

Source code: Http://easymorse-iphone.googlecode.com/svn/trunk/iphone.network1/

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.