判断设备类型是iPhone还是iPad

在Target->Targeted Device Family的值改为iPhone/iPad


if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)

 {

    /* this is ipad */

 }else 

 {

   /* this is iphone */

 }

原文地址:https://www.cnblogs.com/GnagWang/p/2144366.html