2013-03-30 27 views

回答

0

是,我找到了答案这个

#define IS_IPHONE ([[[UIDevice currentDevice] model] isEqualToString:@"iPhone"]) 
#define IS_IPOD ([[[UIDevice currentDevice] model] isEqualToString:@"iPod touch"]) 
1

下面的代码用于查找当前设备

NSString *deviceStr = [UIDevice currentDevice].model; 
NSLog(@"device:%@",deviceStr); 

,如果你的设备是iPod的那么它将返回

iPod touch 

如果您的设备是iPhone

iPhone 

,如果你的设备是iPad的

iPad 
相关问题