简体   繁体   English

为什么 UICollectionView 在 Xcode 11 (ios 13) 中省略行/内部间距?

[英]Why UICollectionView omit Line/Intrim spacing in Xcode 11 (ios 13)?

I am using UICollectionViewFlowLayout.我正在使用 UICollectionViewFlowLayout。 For the same cell size, it's working fine but if size differs it's making LineSpacing and Interim spacing for UICollectionView Zero as shown in the image below.对于相同的单元格大小,它工作正常,但如果大小不同,它会使 UICollectionView 的 LineSpacing 和中间间距为零,如下图所示。

Is there anything new in Xcode 11 (ios 13) that makes collection view change its behavior. Xcode 11 (ios 13) 中是否有任何新内容可以使集合视图改变其行为。

I have tried pragmatically as well as in storyboard but it didn't work.我在 storyboard 中都进行了务实的尝试,但没有成功。 Build with:构建:

------------------- Xcode 11.0 ---------------------------------|------------------ Xcode 10.x --------------------------- -------- Xcode 11.0 ----------------------------- -|-------- Xcode 10.x ------------------------ ----

在此处输入图像描述

Try this尝试这个

layout.minimumInteritemSpacing = 0 layout.minimumInteritemSpacing = 0

layout.minimumLineSpacing = 0 layout.minimumLineSpacing = 0

Here Give how much spacing You want and also have a chance to do this in storyboard.在这里给出你想要的间距,也有机会在 storyboard 中执行此操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM