iPad适配

网友投稿 972 2022-09-26

iPad适配

iPad适配

iOS14支持的iPad有7种尺寸(强制横屏模式),都是近似4:3。 全部都是2倍图。 根据上下感应区分为两种种情况:1.上下都没有;2.上下都有。 底部感应区大小:0或20物理像素两种尺寸。 顶部感应区:20物理像素或24物理像素两种尺寸。所以顶部状态栏高度就是64物理像素或68物理像素。 根据这个标准上下状态栏分为下面两类(本文除了倍率外其它单位默认都是物理像素): 顶部工具栏高度:64, 底部工具栏高度:49。 iPad mini 4,iPad mini(5th generation),iPad (5th generation),iPad (6th generation),iPad Air 2,iPad Pro (9.7-inch) phoneType:x86_64, FULL_WIDTH:1024.000000, FULL_HEIGHT:768.000000, [UIScreen mainScreen].scale:2.000000, 倍率:2.000000, 是否有顶部感应区:有, 是否有底部感应区:没有,横纵比:1.333333, safeAreaInsets-:20.000000, safeAreaInsets.bottom:0.000000, 顶部工具栏高度:64.000000, 底部工具栏高度:49.000000; iPad (7th generation)iPad (8th generation) honeType:x86_64, FULL_WIDTH:1080.000000, FULL_HEIGHT:810.000000, [UIScreen mainScreen].scale:2.000000, 倍率:2.000000, 是否有顶部感应区:有, 是否有底部感应区:没有,横纵比:1.333333, safeAreaInsets-:20.000000, safeAreaInsets.bottom:0.000000, 顶部工具栏高度:64.000000, 底部工具栏高度:49.000000; iPad Air(3th generation),iPad Pro (10.5-inch) phoneType:x86_64, FULL_WIDTH:1112.000000, FULL_HEIGHT:834.000000, [UIScreen mainScreen].scale:2.000000, 倍率:2.000000, 是否有顶部感应区:有, 是否有底部感应区:没有,横纵比:1.333333, safeAreaInsets-:20.000000, safeAreaInsets.bottom:0.000000, 顶部工具栏高度:64.000000, 底部工具栏高度:49.000000; iPad Pro (12.9-inch)(1st generation),iPad Pro (12.9-inch)(2th generation) phoneType:x86_64, FULL_WIDTH:1366.000000, FULL_HEIGHT:1024.000000, [UIScreen mainScreen].scale:2.000000, 倍率:2.000000, 是否有顶部感应区:有, 是否有底部感应区:没有,横纵比:1.333984, safeAreaInsets-:20.000000, safeAreaInsets.bottom:0.000000, 顶部工具栏高度:64.000000, 底部工具栏高度:49.000000;

顶部工具栏高度:68, 底部工具栏高度:69 iPad Air(4th generation) phoneType:x86_64, FULL_WIDTH:1180.000000, FULL_HEIGHT:820.000000, [UIScreen mainScreen].scale:2.000000, 倍率:2.000000, 是否有顶部感应区:有, 是否有底部感应区:有,横纵比:1.439024, safeAreaInsets-:24.000000, safeAreaInsets.bottom:20.000000, 顶部工具栏高度:68.000000, 底部工具栏高度:69.000000; iPad Pro (11-inch)(2th generation),iPad Pro (11-inch)(1st generation), iPad Pro (11-inch)(2th generation) phoneType:x86_64, FULL_WIDTH:1194.000000, FULL_HEIGHT:834.000000, [UIScreen mainScreen].scale:2.000000, 倍率:2.000000, 是否有顶部感应区:有, 是否有底部感应区:有,横纵比:1.431655, safeAreaInsets-:24.000000, safeAreaInsets.bottom:20.000000, 顶部工具栏高度:68.000000, 底部工具栏高度:69.000000; iPad Pro (12.9-inch) (3th generation),iPad Pro (12.9-inch) (4th generation) phoneType:x86_64, FULL_WIDTH:1366.000000, FULL_HEIGHT:1024.000000, [UIScreen mainScreen].scale:2.000000, 倍率:2.000000, 是否有顶部感应区:有, 是否有底部感应区:有,横纵比:1.333984, safeAreaInsets-:24.000000, safeAreaInsets.bottom:20.000000, 顶部工具栏高度:68.000000, 底部工具栏高度:69.000000; 计算代码

NSLog(@"phoneType:%@, FULL_WIDTH:%f, FULL_HEIGHT:%f, [UIScreen mainScreen].scale:%f, 倍率:%f, 是否有顶部感应区:%@, 是否有底部感应区:%@,横纵比:%f, safeAreaInsets-:%f, safeAreaInsets.bottom:%f, 顶部工具栏高度:%f, 底部工具栏高度:%f",[BITSingleObject sharedInstance].phoneType, FULL_WIDTH, FULL_HEIGHT, [UIScreen mainScreen].scale, [UIScreen mainScreen].scale, LL_iPhoneX?@"有":@"没有", have_bottom_safeArea?@"有":@"没有",FULL_WIDTH/FULL_HEIGHT, [[UIApplication sharedApplication] delegate].window.safeAreaInsets-, [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom,[[UIApplication sharedApplication] delegate].window.safeAreaInsets-+44, [[UIApplication sharedApplication] delegate].window.safeAreaInsets.bottom+49);

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Xcode 10遇到的证书问题 is automatically signed, but provisioning profile YYYY has been manually specified
下一篇:If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`
相关文章

 发表评论

暂时没有评论,来抢沙发吧~