郝萌主傾心貢獻。尊重做者的勞動成果。請勿轉載。緩存
假設文章對您有所幫助。歡迎給做者捐贈。支持郝萌主。捐贈數額任意,重在心意^_^
ide
我要捐贈: 點擊捐贈post
Cocos2d-X源代碼下載:點我傳送spa
遊戲官方下載:http://dwz.cn/RwTjl操作系統
遊戲視頻預覽:http://dwz.cn/RzHHd.net
遊戲開發博客:http://dwz.cn/RzJzIcode
遊戲源代碼傳送:http://dwz.cn/Nret1orm
1. 常常用法視頻
NSLog(@"HostName: %@", [[NSProcessInfo processInfo] hostName]); //globallyUniqueString 惟一的標示符,每次調用都會不同,可以用做一些暫時緩存文件的名字 NSLog(@"GlobalUniqueString: %@", [[NSProcessInfo processInfo] globallyUniqueString]); //操做系統名稱 NSLog(@"OperatingSystemName: %@", [[NSProcessInfo processInfo] operatingSystemName]); //操做系統版本號 NSLog(@"OperatingSystemVersion: %@", [[NSProcessInfo processInfo] operatingSystemVersionString]); //物理內存 NSLog(@"PhysicalMem: %llu", [[NSProcessInfo processInfo] physicalMemory]); //進程名稱 NSLog(@"ProcessName: %@", [[NSProcessInfo processInfo] processName]); //供應商標識 NSLog(@"UniqueId: %@", [UIDevice currentDevice].identifierForVendor); //設備類型(iPhone、iPad) NSLog(@"userInterfaceIdiom: %d", [UIDevice currentDevice].userInterfaceIdiom); //設備名字 NSLog(@"Name: %@", [UIDevice currentDevice].name); //系統名字 NSLog(@"SystemName: %@", [UIDevice currentDevice].systemName); //系統版本號 NSLog(@"SystemVersion: %@", [UIDevice currentDevice].systemVersion); //模型 NSLog(@"Model: %@", [UIDevice currentDevice].model); //本地化的模型 NSLog(@"LocalizeModel: %@", [UIDevice currentDevice].localizedModel); //電池狀態 NSLog(@"BatteryLevel: %f", [UIDevice currentDevice].batteryLevel);
[[[UIDevice currentDevice] systemVersion] floatValue] >= 9.0f注意:
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 };
郝萌主傾心貢獻,尊重做者的勞動成果,請勿轉載。blog
假設文章對您有所幫助,歡迎給做者捐贈,支持郝萌主,捐贈數額任意。重在心意^_^
我要捐贈: 點擊捐贈
Cocos2d-X源代碼下載:點我傳送
遊戲官方下載:http://dwz.cn/RwTjl
遊戲視頻預覽:http://dwz.cn/RzHHd
遊戲開發博客:http://dwz.cn/RzJzI
遊戲源代碼傳送:http://dwz.cn/Nret1