简体   繁体   English

iOS 10中的UICollectionView对齐单元格

[英]UICollectionView in iOS 10 is misaligning cells

I have a collection view that used to look like this (iOS 9-): 我有一个过去看起来像这样的集合视图(iOS 9-):

正确(和以前)显示的UICollectionView

As of iOS 10 however, that exact same untouched collection view is displaying like this: 但是从iOS 10开始,完全相同的未收藏视图如下所示:

自iOS 10起显示不正确的UICollectionView

No constraints or anything really have been changed from iOS 9 to iOS 10. I simply cannot figure out what the issue is. 从iOS 9到iOS 10,没有任何限制或任何真正的改变。我根本无法弄清楚问题出在哪里。 If it helps, the only constraints on this collection view are 0 spacing stuck to top, left, right and bottom: 如果有帮助,则此集合视图的唯一约束是顶部,左侧,右侧和底部的0间距固定:

在此处输入图片说明

Any help is greatly appreciated. 任何帮助是极大的赞赏。

The issue was I forgot to add constraints for the containing view. 问题是我忘记为包含视图添加约束。 Fixed. 固定。

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

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