在向服务器提出请求之前,我要检查用户设备是否连接到internet。为此,我在AppDelegate类中这样做
- (void)applicationDidBecomeActive:(UIApplication *)application {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the use