在Target->Targeted Device Family的值改为iPhone/iPad
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
/* this is ipad */
}else
{
/* this is iphone */
}
在Target->Targeted Device Family的值改为iPhone/iPad
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
/* this is ipad */
}else
{
/* this is iphone */
}
转载于:https://www.cnblogs.com/GnagWang/archive/2011/08/18/2144366.html