中文字幕在线观看,亚洲а∨天堂久久精品9966,亚洲成a人片在线观看你懂的,亚洲av成人片无码网站,亚洲国产精品无码久久久五月天

iOS獲取設(shè)備信息常用方法

2018-07-20    來源:open-open

容器云強勢上線!快速搭建集群,上萬Linux鏡像隨意使用
    NSLog(@"HostName: %@", [[NSProcessInfo processInfo] hostName]);  
    //globallyUniqueString 唯一的標(biāo)示符,每次調(diào)用都會不一樣,可以用作一些臨時緩存文件的名字  
    NSLog(@"GlobalUniqueString: %@", [[NSProcessInfo processInfo] globallyUniqueString]);  
    //操作系統(tǒng)名稱  
    NSLog(@"OperatingSystemName: %@", [[NSProcessInfo processInfo] operatingSystemName]);  
    //操作系統(tǒng)版本  
    NSLog(@"OperatingSystemVersion: %@", [[NSProcessInfo processInfo] operatingSystemVersionString]);  
    //物理內(nèi)存  
    NSLog(@"PhysicalMem: %llu", [[NSProcessInfo processInfo] physicalMemory]);  
    //進(jìn)程名稱  
    NSLog(@"ProcessName: %@", [[NSProcessInfo processInfo] processName]);  
    //供應(yīng)商標(biāo)識  
    NSLog(@"UniqueId: %@", [UIDevice currentDevice].identifierForVendor);  
    //設(shè)備類型(iPhone、iPad)  
    NSLog(@"userInterfaceIdiom: %d", [UIDevice currentDevice].userInterfaceIdiom);  
    //設(shè)備名字  
    NSLog(@"Name: %@", [UIDevice currentDevice].name);  
    //系統(tǒng)名字  
    NSLog(@"SystemName: %@", [UIDevice currentDevice].systemName);  
    //系統(tǒng)版本  
    NSLog(@"SystemVersion: %@", [UIDevice currentDevice].systemVersion);  
    //模型  
    NSLog(@"Model: %@", [UIDevice currentDevice].model);  
    //本地化的模型  
    NSLog(@"LocalizeModel: %@", [UIDevice currentDevice].localizedModel);  
    //電池狀態(tài)  
    NSLog(@"BatteryLevel: %f", [UIDevice currentDevice].batteryLevel);  
   //判斷設(shè)備是否是9.0以上系統(tǒng)
    [[[UIDevice currentDevice] systemVersion] floatValue] >= 9.0f  注意:
//假如我們的設(shè)備版本號為9.1.1(為字符串類型),對其進(jìn)行floatValue浮點化后值為9.100000。3. //判斷設(shè)備是否是iPhone、iPad
    iPad:[[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad  
    iPhone: [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone  
      
    UIUserInterfaceIdiom in UIDevice.h  
    typedef NS_ENUM(NSInteger, UIUserInterfaceIdiom) {  
    #if __IPHONE_3_2 <= __IPHONE_OS_VERSION_MAX_ALLOWED  
        UIUserInterfaceIdiomPhone,           // iPhone and iPod touch style UI  
        UIUserInterfaceIdiomPad,             // iPad style UI  
    #endif  
    };  

標(biāo)簽:

版權(quán)申明:本站文章部分自網(wǎng)絡(luò),如有侵權(quán),請聯(lián)系:west999com@outlook.com
特別注意:本站所有轉(zhuǎn)載文章言論不代表本站觀點!
本站所提供的圖片等素材,版權(quán)歸原作者所有,如需使用,請與原作者聯(lián)系。

上一篇:Android畫板實現(xiàn)

下一篇:Android橡皮擦效果