如何在运行时单独识别 ipad 1 和 ipad 2
可能的重复:
使用 iPhone SDK 确定设备(iPhone、iPod Touch)< br> iPad 2 检测
请指导我如何在真实设备上运行时检测 ipad 和 ipad 2.. 我由于性能问题,想要将不同的图像加载到两台手机上。
提前致谢
Possible Duplicate:
Determine device (iPhone, iPod Touch) with iPhone SDK
iPad 2 detection
Please guide me on how to detect ipad and ipad 2 at runtime on real device.. I want to load different images to both handsets due to performance issue.
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最简单、最短的方法是检查摄像头,如 iPad 2 检测 中所述:
或者更简单:
BOOL isiPad2 = [[自身平台] isEqualToString:@"iPad2,1"];
请记住,该字符串也可以是
iPad2,2
和iPad2,3
。Easiest and shortest way is to check for a camera, as said in iPad 2 detection :
Or even simpler:
BOOL isiPad2 = [[self platform] isEqualToString:@"iPad2,1"];
Remember that the string can be
iPad2,2
andiPad2,3
as well.