【发布时间】:2010-03-15 13:46:03
【问题描述】:
这是检测用户正在运行的设备的正确方法吗?
NSString *currentModel = [[UIDevice currentDevice] model];
if ([currentModel isEqualToString:@"iPhone"]) {
// The user is running on iPhone so allow Call, Camera, etc.
} else {
// The user is running on a different device (iPod / iPad / iPhone Simulator) disallow Call.
}
【问题讨论】:
-
这似乎是这个问题的重复:stackoverflow.com/questions/688001/…
标签: iphone model detection ipod-touch