Răsfoiți Sursa

Merge branch 'master' into develop

# Conflicts:
#	README.md
Ashley Mills 10 ani în urmă
părinte
comite
7cad8346c9
2 a modificat fișierele cu 7 adăugiri și 6 ștergeri
  1. 6 6
      README.md
  2. 1 0
      Reachability.swift

+ 6 - 6
README.md

@@ -46,9 +46,9 @@ Just drop the **Reachability.swift** file into your project. That's it!
         // be on the main thread, like this:
         dispatch_async(dispatch_get_main_queue()) {
             if reachability.isReachableViaWiFi() {
-                println("Reachable via WiFi")
+                print("Reachable via WiFi")
             } else {
-                println("Reachable via Cellular")
+                print("Reachable via Cellular")
             }
         }
     }
@@ -56,7 +56,7 @@ Just drop the **Reachability.swift** file into your project. That's it!
         // this is called on a background thread, but UI updates must
         // be on the main thread, like this:
         dispatch_async(dispatch_get_main_queue()) {
-            println("Not reachable")
+            print("Not reachable")
         }
     }
 
@@ -104,12 +104,12 @@ and
 
         if reachability.isReachable() {
             if reachability.isReachableViaWiFi() {
-                println("Reachable via WiFi")
+                print("Reachable via WiFi")
             } else {
-                println("Reachable via Cellular")
+                print("Reachable via Cellular")
             }
         } else {
-            println("Not reachable")
+            print("Not reachable")
         }
     }
 ````

+ 1 - 0
Reachability.swift

@@ -161,6 +161,7 @@ public class Reachability: NSObject {
     public func stopNotifier() {
         if let reachabilityRef = reachabilityRef {
             SCNetworkReachabilitySetCallback(reachabilityRef, nil, nil)
+            SCNetworkReachabilitySetDispatchQueue(reachabilityRef, nil)
         }
         notifierRunning = false
     }