How to detect change in network with Reachability?

后端 未结 3 457
刺人心
刺人心 2020-12-18 00:57

I\'m currently checking network connection on viewDidLoad using this:

-(BOOL)reachable {
    ReachabilityDRC *r = [ReachabilityDRC reachabilityW         


        
3条回答
  •  -上瘾入骨i
    2020-12-18 01:28

    I've used the excellent extension to the Reachability class that the Donoho Design Group has put together. It has notifications that allow you to be alerted when the network status changes.

    http://blog.ddg.com/?p=24

    Good luck

提交回复
热议问题