Skip to content

Instantly share code, notes, and snippets.


Eugen Pirogoff eugenpirogoff

View GitHub Profile
eugenpirogoff / Reachability.swift
Created Oct 21, 2015
Check if there is a network connection
View Reachability.swift
import Foundation
public class Reachability {
class func isConnectedToNetwork()->Bool{
var Status:Bool = false
let url = NSURL(string: "")
let request = NSMutableURLRequest(URL: url!)
request.HTTPMethod = "HEAD"
request.cachePolicy = NSURLRequestCachePolicy.ReloadIgnoringLocalAndRemoteCacheData
View gist:09a25499ff776007f631
### Keybase proof
I hereby claim:
* I am eugenpirogoff on github.
* I am eugenpirogoff ( on keybase.
* I have a public key whose fingerprint is 409F 1F0D 5026 3E90 544E 15A8 B368 ACFE 0F43 E26A
To claim this, I am signing this object: