¡@

Home 

2014/10/15 ¤U¤È 10:10:40

iphone Programming Glossary: isreachable

Disable Alert-view When connect to the Internet [closed]

http://stackoverflow.com/questions/13520322/disable-alert-view-when-connect-to-the-internet

connection The working Code void reachabilityChanged NSNotification note Reachability reach note object if reach isReachable notificationLabel.text @ Notification Says Reachable NSLog @ Internet is Up else notificationLabel.text @ Notification.. your viewDidLoad and use it after void reachabilityChanged NSNotification note Reachability reach note object if reach isReachable notificationLabel.text @ Notification Says Reachable NSLog @ Internet is Up self performSelector @selector dismissAlert..

How to check for local Wi-Fi (not just cellular connection) using iPhone SDK?

http://stackoverflow.com/questions/1448411/how-to-check-for-local-wi-fi-not-just-cellular-connection-using-iphone-sdk

modify your addressReachable method. Instead of return reachable flags kSCNetworkFlagsReachable add the following BOOL isReachable flags kSCNetworkFlagsReachable 0 BOOL needsConnection flags kSCNetworkFlagsConnectionRequired 0 return isReachable needsConnection.. isReachable flags kSCNetworkFlagsReachable 0 BOOL needsConnection flags kSCNetworkFlagsConnectionRequired 0 return isReachable needsConnection YES NO This is the proper way to check for a connection available. Now if you want to clearly distinguish.. want to clearly distinguish between cellular and wifi modify your method to return an int and use the following BOOL isReachable flags kSCNetworkFlagsReachable 0 BOOL needsConnection flags kSCNetworkFlagsConnectionRequired 0 if isReachable needsConnection..