打开系统设置页

- (void) action_openSettings:(id)sender{
    if ([[UIDevice currentDevice]systemVersion].floatValue >= 8.0) {
        // 如果app没有Settings.bundle,则打开系统设置页,如果有,则打开应用对应的设置页
          [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
    }else{
        //iOS 8版本以下
//        NSURL*url=[NSURL URLWithString:@"prefs:root=WIFI"];//wifi
          NSURL*url=[NSURL URLWithString:@"prefs:root=General&path=About"];//通用
        [[UIApplication sharedApplication] openURL:url];
    }
    
}

  

posted @ 2015-08-01 15:06  killiancheung  阅读(252)  评论(0编辑  收藏  举报