如何以编程方式检查iPad版本/型号

编程入门 行业动态 更新时间:2024-10-26 18:24:16
本文介绍了如何以编程方式检查iPad版本/型号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有没有办法检查iPad的版本/型号(即iPad 1/2/3)。 我在iPad界面中使用多个叠加层的透明度。虽然在iPad 2上工作令人满意,但iPad 1并没有提供良好的用户体验。所以我想删除iPad 1上的透明度,但无法找到一种方法来了解我正在处理的iPad。

Is there a method to check the version/model of an iPad (i.e iPad 1/2/3). I am using some transparency in my iPad interfaces with multiple overlays. While working satisfactory on an iPad 2, an iPad 1 doesn't give as nice a user experience. So I would like to remove the transparency on iPad 1, but cannot find a way to know which iPad I am dealing with.

有没有一个技巧可以区分具有更强大图形处理器(即目前iPad 2 + 3)的iPad 1和更高版本?

Is there a trick to distinguish between iPad 1 and higher versions which have a more powerful graphical processor (i.e. currently iPad 2 + 3)?

我在Web浏览器中看到它是可能的,所以应该有一种方法来获取代码中的型号。

I read it is possible in the web browser, so there should be a way to get the model number in the code as well.

推荐答案

我检查是否存在iPad上没有的相机1.由于2和3具有类似的CPU功能,这对我来说效果很好(我在类似的情况,但有内存)。

I check for the presence of a camera, which is not available on the iPad 1. Since the 2 and 3 have similar CPU capabilities, this has worked well for me (I'm in a similar situation, but with memory).

if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypeCamera]) NSLog(@"iPad 2 or 3"); else NSLog(@"iPad 1");

更多推荐

如何以编程方式检查iPad版本/型号

本文发布于:2023-11-03 16:44:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555606.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:型号   版本   方式   iPad

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!