如何判断 ios设备的类型(iphone,ipod,ipad) 如何判断 ios设备的类型(iphone,ipod,ipad) 功能函数:-(bool)checkDevice:(NSString*)name { NSString* deviceType = [UIDevice currentDevice].model; NSLog(@"deviceType = %@", deviceType); NSRange range = [deviceType rangeOfString:name]; return range.location != NSNotFound; } 调用: NSString * nsStrIphone=@"iPhone"; NSString * nsStrIpod=@"iPod"; NSString * nsStrIpad=@"iPad"; bool bIsiPhone=false; bool bIsiPod=false; bool bIsiPad=false; bIsiPhone=[self checkDevice:nsStrIphone]; bIsiPod=[self checkDevice:nsStrIpod]; bIsiPad=[self checkDevice:nsStrIpad]; 版权声明:本文为tangaowen原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。原文链接:https://blog.csdn.net/tangaowen/article/details/6525992