当app的移动网络被关闭时,而此时在app中使用使用的刚好是手机移动网络时,app是没有网的。
此时需要添加一个提示框,提示用户去开启app的蜂窝网。
解决思路:手机处于手机移动网的情况下,非wifit和无网络状态,来判断app是否有蜂窝网权限。
1.判断是不是于手机移动网 2.判断app是否有蜂窝网权限
//
// MobileNetworkAccess.h
// Wallet
//
// Created by Zhanggaoju on 2018/9/5.
// Copyright © 2018年 www.picc.com. All rights reserved.
//
#import
@interfaceMobileNetworkAccess :NSObject
+(MobileNetworkAccess*) sharedMobileNetworkAccess;
//app蜂窝网关闭是弹框提示
-(void)mobileNetworkAccessWithViewController:(UIViewController*)viewController;
@end
//
// MobileNetworkAccess.m
// Wallet
//
// Created by Zhanggaoju on 2018/9/5.
// Copyright © 2018年 www.picc.com. All rights reserved.
//
#import "MobileNetworkAccess.h"
#import