background image

    运行时需要选择运行设备,有 iPad 6.0 Simulator、iPhone 6.0 Simulator 和 iOS Device(真
机运行)几个选项,选择 iPhone 6.0 Simulator,这说明应用要在 iPhone 6.0 模拟器上运行。

    在编程时可以通过下面语句判断设备,常量 UIUserInterfaceIdiomPhone 用于判断是否
为 iPhone 设备,UIUserInterfaceIdiomPad 用于判断是否为 iPad 设备。

if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {

// iPhone 设备