gpt4 book ai didi

ios - View 不适合 ios 中的 ipad 视网膜

转载 作者:行者123 更新时间:2023-11-29 12:13:49 24 4
gpt4 key购买 nike

当我在模拟器中运行我的应用程序时,它可以正常工作,但当我在真实设备上测试它时, View 没有填满 View 。

在模拟器和 ipad mini 8.4 中:

NSLog(@"frame Main %@",NSStringFromCGRect(self.view.frame));
frame Main {{0, 0}, {768, 1024}}

在此屏幕上正常工作,底部 View (灰色)显示&屏幕截图是: enter image description here

在非 Retina ipad(10 英寸 ipad 6.3)上

NSLog(@"frame Main %@",NSStringFromCGRect(self.view.frame));
frame Main {{0, 20}, {768, 1004}}

在这个屏幕上工作不正常,底部 View (灰色)没有显示我也在导航栏下获得空间

enter image description here

我做错了什么......

最佳答案

尝试以下过程。希望它能奏效。

  1. 您必须为特定 View 添加自动调整大小。看看屏幕截图。 enter image description here

  2. 如果在您的应用程序中启用自动布局,那么您可以添加左、右、上和下约束。

注意:为 iPad 添加启动图像源

关于ios - View 不适合 ios 中的 ipad 视网膜,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32501702/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com