ios - Swift error: Could not find an overload for '==' that accepts the supplied arguments? -


actually iam checking internet connection in code , weird error "could not find overload '==' accepts supplied arguments"

here code snippet,

override func viewdidload() {         super.viewdidload()          checkknetworkstatus()          let requesturl = nsurl(string: "http://example")          let request = nsurlrequest(url: requesturl!)          webview.loadrequest(request)      }   func checkknetworkstatus(){          let networkchecking : reachability = reachability.reachabilityforinternetconnection()          networkchecking.startnotifier()          var status : networkstatus = networkchecking.currentreachabilitystatus()          if (status == notreachable)   ***//error***         {             // statement         }  } 

you can if (status == .notreachable) or if (status == networkstatus.notreachable).


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -