我有时需要检查网络连接,并使用“可达性”来实现此目的。可达性startNotifier - 是否需要电话资源
会更好手动检查使用“可达性”,如互联网连接:
BOOL status = ([[Reachability reachabilityForInternetConnection] currentReachabilityStatus] != NotReachable);
或者使用可达性通知和
//Start listening for reachability notifications on the current run loop
- (BOOL) startNotifier;
做通知需要一些手机的recources如电池等,我会如果我不使用“stopNotifier”会出现一些问题?
谢谢
但它说什么,我应该使用...并没有说为什么... – Injectios
我认为这将是明确的,我的答案,但你应该使用单例,而不是在这种情况下通知。 – datwelk