swift2 - SCNetworkReachabilityFlags bitwise AND comparison error with Xcode 7 -


having updated xcode 7, i'm getting error on previous code , can't understand why.

this example of code have:

private func isreachable(flags: scnetworkreachabilityflags) -> bool {   return flags & scnetworkreachabilityflags.reachable != 0 } 

yielding error: binary operator '&' cannot applied 2 'scnetworkreachabilityflags' operands

i'm assuming update swift, can't find it. appreciated.

as of swift 2, have use .contains

private func isreachable(flags: scnetworkreachabilityflags) -> bool {   return flags.contains(.reachable) } 

Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -