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
Post a Comment