gpt4 book ai didi

ios - Collection View 调整大小问题 iPhone 4 vs iPhone 5

转载 作者:行者123 更新时间:2023-11-28 22:37:13 24 4
gpt4 key购买 nike

我在 View 中有一个集合 Controller 。

集合 Controller 没有覆盖屏幕顶部的 40 像素,因此我可以将按钮放在那里。

在 iphone 4 上它看起来像这样(正确的方式):蓝色是 Collection View ,红色是单元格 enter image description here

但是在 iPhone 5 上它看起来像这样,我不太确定为什么它不会扩散并覆盖蓝色部分

enter image description here

这个界面构建器看起来像:

Collection View : enter image description here

Collection View 单元格 enter image description here

非常感谢任何帮助,谢谢

最佳答案

您的收藏 View 具有固定大小。你有启用自动布局吗?如果是,只需转到 iPhone 5 的 View 并调整大小,使其适合 iPhone 5 constraints。之后它应该自动调整到 iPhone 5 和 iPhone <5

约束:如果您达到这些约束,InterfaceBuilder 将执行一些“磁性”行为。

关于ios - Collection View 调整大小问题 iPhone 4 vs iPhone 5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15587544/

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