我正在尝试检测iPad Pro设备,尝试猜测其高度:
NSLog(@"%f",self.view.frame.size.height);
但它返回了1024
!与iPad非Retina设备相同。有什么建议吗?
我需要使用以下代码行来精确指定iPad Pro的某些代码:
#define iPadPro ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad && [UIScreen mainScreen].bounds.size.height == 2732)
...而且代码必须在iOS模拟器上检测到iPad Pro!
谢谢。
编辑:有些人建议使用LunchScreen,但当我使用它时会出现这种情况(缩小):
![enter image description here](https://istack.dev59.com/vNHf4.webp)
[UIScreen mainScreen].bounds
返回什么? - rmaddy