因此,对于当前的iOS设备,我有以下代码“机器名称”。有人可以肯定地知道“新iPad”的代码是什么吗? (iPad将于2012年3月7日发布)

if ([platform isEqualToString:@"iPhone1,1"])    return @"iPhone1G GSM";
if ([platform isEqualToString:@"iPhone1,2"])    return @"iPhone3G GSM";
if ([platform isEqualToString:@"iPhone2,1"])    return @"iPhone3GS GSM";
if ([platform isEqualToString:@"iPhone3,1"])    return @"iPhone4 GSM";
if ([platform isEqualToString:@"iPhone3,3"])    return @"iPhone4 CDMA";
if ([platform isEqualToString:@"iPhone4,1"])    return @"iPhone4S";
if ([platform isEqualToString:@"iPhone5,1"])    return @"iPhone5";
if ([platform isEqualToString:@"iPod1,1"])      return @"iPod 1G";
if ([platform isEqualToString:@"iPod2,1"])      return @"iPod 2G";
if ([platform isEqualToString:@"iPod3,1"])      return @"iPod 3G";
if ([platform isEqualToString:@"iPod4,1"])      return @"iPod 4G";
if ([platform isEqualToString:@"iPad1,1"])      return @"iPad WiFi";
if ([platform isEqualToString:@"iPad2,1"])      return @"iPad2 WiFi";
if ([platform isEqualToString:@"iPad2,2"])      return @"iPad2 GSM";
if ([platform isEqualToString:@"iPad2,3"])      return @"iPad2 CDMAV";
if ([platform isEqualToString:@"iPad2,4"])      return @"iPad2 CDMAS";
if ([platform isEqualToString:@"i386"])         return @"Simulator";
if ([platform isEqualToString:@"x86_64"])       return @"Simulator";

最佳答案

iClarified states三个新的iPad3型号为:

5.1.0(iPad 3 Wi-Fi):iPad3,1

5.1.0(iPad 3 GSM):iPad3,2

5.1.0(iPad 3 CDMA):iPad3,3

他们具有在apple.com上还原图像的链接,因此信息可能相距不远。

关于objective-c - iOS “the new iPad” UIDeviceHardware硬件机器代号,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/9638970/

10-11 15:37