• iOS获取设备信息


        NSString *strName = [[UIDevice currentDevice] name]; // Name of the phone as named by user
        
        
        NSString *strSysName = [[UIDevice currentDevice] systemName]; // "iPhone OS"
        
        NSString *strSysVersion = [[UIDevice currentDevice] systemVersion]; // "2.2.1"
        
        NSString *strModel = [[UIDevice currentDevice] model]; // "iPhone" on both devices
        
        NSString *strLocModel = [[UIDevice currentDevice] localizedModel]; // "iPhone" on both devices
        
        float version = [[[UIDevice currentDevice] systemVersion] floatValue];
        
        
        
        NSLog(@"\nstrName=%@  \nstrSysName=%@  \nstrSysVersion=%@  \nstrModel=%@  \nstrLocModel=%@  \nversion=%f",strName,strSysName,strSysVersion,strModel,strLocModel,version);


    //打印结果

    strName=haijie的 iPhone  
    strSysName=iPhone OS  
    strSysVersion=8.4  
    strModel=iPhone  
    strLocModel=iPhone  
    version=8.400000

     
  • 相关阅读:
    javascript 压缩空格代码演示
    javascript 正则表达式代码
    数据筛选和排序
    实现win的on程序数据更新
    使用listview控件展示数据
    初始windows程序
    构建布局良好的windows程序
    ADO.NET访问数据库
    模糊查询
    基本查询
  • 原文地址:https://www.cnblogs.com/haijieFeng/p/4736268.html
Copyright © 2020-2023  润新知