瀏覽代碼

Code tweaks

Ashley Mills 9 年之前
父節點
當前提交
199c3a1aee
共有 2 個文件被更改,包括 3 次插入7 次删除
  1. 3 6
      Reachability/Reachability.swift
  2. 0 1
      ReachabilityMacSample/ViewController.swift

+ 3 - 6
Reachability/Reachability.swift

@@ -62,12 +62,9 @@ public class Reachability: NSObject {
 
         public var description: String {
             switch self {
-            case .reachableViaWWAN:
-                return "Cellular"
-            case .reachableViaWiFi:
-                return "WiFi"
-            case .notReachable:
-                return "No Connection"
+            case .reachableViaWWAN: return "Cellular"
+            case .reachableViaWiFi: return "WiFi"
+            case .notReachable: return "No Connection"
             }
         }
     }

+ 0 - 1
ReachabilityMacSample/ViewController.swift

@@ -18,7 +18,6 @@ class ViewController: NSViewController {
   override func viewDidLoad() {
     super.viewDidLoad()
     view.wantsLayer = true
-    view.layer?.backgroundColor = .white.cgColor
 
     // Start reachability without a hostname intially
     setupReachability(useHostName: false, useClosures: true)