ios判断用户设备:
if (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPhone) {
NSLog(@"Your dervice is phone!!");
}elseif (UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad)
{
NSLog(@"Your dervice is ipad!!");
}else{ NSLog(@"未识别您的设备......"); }
设备类型 iphone 和 ipad --- 下边的枚举
UIUserInterfaceIdiom
The type of interface that should be used on the current device
typedef enum {
UIUserInterfaceIdiomPhone,
UIUserInterfaceIdiomPad,
} UIUserInterfaceIdiom;