手机系统版本跳转

来源:互联网 发布:win7 upnp nat端口失败 编辑:程序博客网 时间:2024/04/29 11:48
- (NSString*) machineName{
    struct utsname systemInfo;
    uname(&systemInfo;);
    NSString *result = [NSString stringWithCString:systemInfo.machine
                                          encoding:NSUTF8StringEncoding];
    return result;
}

//成功
NSString*phoneVersion = [[UIDevicecurrentDevice]systemVersion];
   NSLog(@"手机系统版本:%@",phoneVersion);

跳转链接
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://blog.csdn.net/joycecsdn"]];
跳转呼叫
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://8008808888"]];

跳转设置
-(IBAction)btnSetting:(id)sender{ 
    NSURL*url=[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]; 
    [[UIApplication sharedApplication] openURL:url]; 
}

0 0
原创粉丝点击