Browse Source

Merge pull request #353 from johncodeos-forks/master

Change from Reachability()! to try! Reachability()
Ashley Mills 6 years ago
parent
commit
b2507faeaa
1 changed files with 2 additions and 2 deletions
  1. 2 2
      README.md

+ 2 - 2
README.md

@@ -81,7 +81,7 @@ NOTE: All closures are run on the **main queue**.
 
 ```swift
 //declare this property where it won't go out of scope relative to your listener
-let reachability = Reachability()!
+let reachability = try! Reachability()
 
 reachability.whenReachable = { reachability in
     if reachability.connection == .wifi {
@@ -113,7 +113,7 @@ NOTE: All notifications are delivered on the **main queue**.
 
 ```swift
 //declare this property where it won't go out of scope relative to your listener
-let reachability = Reachability()!
+let reachability = try! Reachability()
 
 //declare this inside of viewWillAppear