有没有办法确定运行应用程序的设备。如果可能,我想区分 iPhone
和 iPod Touch
。
最佳答案
您可以使用 UIDevice
像这样的类:
NSString *deviceType = [UIDevice currentDevice].model;
if([deviceType isEqualToString:@"iPhone"])
// it's an iPhone
https://stackoverflow.com/questions/448162/