//在程序的启动处,开启通知
- (BOOL)application:(UIApplication
{
//开启网络状况的监听
[[NSNotificationCenter
hostReach
[hostReach
}
// 连接改变
- (void)reachabilityChanged: (NSNotification*)note
{
Reachability*curReach = [note
NSParameterAssert([curReach
[self
}
//处理连接改变后的情况
- (void)updateInterfaceWithReach
{
if
UIAlertView
}
}
本博客介绍如何在iOS应用中使用Reachability库实时检测网络连接状况,并在连接改变时触发相应处理动作。
1068

被折叠的 条评论
为什么被折叠?



