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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

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

android - How to create dynamically Fragment pager adapter -