iOS/iPhone Reachability - How to only check when internet is lost/not reachable using Reachability.m/.h

前端 未结 7 462
一生所求
一生所求 2021-02-01 09:59

Currently i am using the class by apple reachability.m/.h and it works, except it notifies me for any change, where as i would like to only notify the user if the network is not

相关标签:
7条回答
  • 2021-02-01 10:43

    One thing you can do is unsubscribe to the changed notification NSNotificationCenter removeObserver... while you're processing one in the callback. Add back the observer before returning.

    0 讨论(0)
提交回复
热议问题