Take a look at Apple’s sample code. The Reachability project shows how to detect a connection.
http://developer.apple.com/iphone/library/samplecode/Reachability/index.html
More Related Contents:
- Prompt login alert with Twitter framework in iOS5?
- Twitter Framework for ios6 how to login through settings from app
- How change the size of sprite in cocos2d? [closed]
- is possible to convert soap web services to xml format? [closed]
- iOS – Build fails with CocoaPods cannot find header files
- build failed with: ld: duplicate symbol _OBJC_CLASS_$_Algebra5FirstViewController
- Why shouldn’t I subclass a UIButton?
- How can I reduce the file size of a video created with UIImagePickerController?
- Creating layout constraints programmatically
- Xcode doesn’t show the line that causes a crash
- Unzipping downloaded files in iOS
- “Application tried to present modally an active controller”?
- iOS taking photo programmatically
- What does the “Couldn’t compile connection:” error mean?
- EXC_BAD_ACCESS in heightForRowAtIndexPath iOS
- How do I convert an integer to the corresponding words in objective-c?
- Replacing one character in a string in Objective-C
- Custom dealloc and ARC (Objective-C)
- UIWebView iOS5 changing user-agent
- Simple http post example in Objective-C?
- Support different orientation for only one view iOS 6
- How to visually create and use static cells in a UITableView embedded in a UIViewController
- Different data for sharing providers in UIActivityViewController
- How Can I Draw Image with Text Wrapping on iOS?
- Fire local notification every day on different times
- How to customize FBLoginVIew?
- Playing an ogg stream in iOS
- “Initializer element is not a compile-time constant” why?
- Xcode linker error: file too small for architecture x86_64
- “Expression is not assignable” — Problem assigning float as sum of two other floats in Xcode?