UIDevice *device = [UIDevice currentDevice];
NSLog(@"%@", device.name); //iPhone Simulator
NSLog(@"%@", device.model); //iPhone Simulator
NSLog(@"%@", device.localizedModel); //iPhone Simulator
NSLog(@"%@", device.systemName); //iPhone OS
NSLog(@"%@", device.systemVersion); //8.4
NSLog(@"%@", @(device.orientation)); //UIDeviceOrientationPortrait
NSLog(@"%@", device.identifierForVendor.UUIDString); //AD824859-07D8-4971-8095-E295D0C0DC3B
本文介绍了一段用于获取iOS设备详细信息的Objective-C代码,包括设备名称、型号、系统名称及版本等。
1720

被折叠的 条评论
为什么被折叠?



