gpt4 book ai didi

ios - UICollectionView 在 segue 期间看起来很正常,但在呈现 View 时会跳下

转载 作者:可可西里 更新时间:2023-11-01 02:18:11 25 4
gpt4 key购买 nike

我有一个初始 View Controller ,它连接到一个 UINavigationController,其中一个 View 包含一个 UICollectionView 作为根。这是要说明的 Storyboard:

enter image description here

每当我启动自定义转场时,都会发生这种情况:

enter image description here

View 像往常一样滑入,但是当使用 presentViewController 呈现 View 时(在 segue 实现中), Collection View 似乎跳了下来。

Storyboard Collection View 的特写:

enter image description here

segue 分解图:

enter image description here

segue 后的分解图:

enter image description here

Custom segue implementation

我很高兴你一路走到这里!抱歉所有图片,我只是想让事情对您来说尽可能简单。我不知道这可能是什么,但我怀疑与导航 Controller 有关。

最佳答案

我遇到了同样的问题,解决方法是将 View Controller 的 automaticallyAdjustsScrollViewInsets 设置为 false。这将确保您的 Collection View 不会跳转。当在导航 Controller 中呈现 View Controller 时,我还能够重新创建此 Collection View 跳转问题,在这种情况下,它会调整导航栏下方的内容。在这种情况下,我必须将导航栏的 translucent 属性设置为 false,因此不需要处理之前的属性。

关于ios - UICollectionView 在 segue 期间看起来很正常,但在呈现 View 时会跳下,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34582207/

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