iOS9-Xcode7中[\u UIFlowLayoutSection updateEstimatedSizeForSection]中的UICollectionView崩溃

iOS9-Xcode7中[\u UIFlowLayoutSection updateEstimatedSizeForSection]中的UICollectionView崩溃,ios,autolayout,uicollectionview,ios9,uicollectionviewcell,Ios,Autolayout,Uicollectionview,Ios9,Uicollectionviewcell,我尝试使用带有UICollectionViewCell的自动布局。在iOS8上运行良好,但在iOS9上崩溃。我尝试更深入地调试,但找不到任何原因。Xcode停止在[\u UIFlowLayoutSection updateEstimatedSizeForSection] 有什么想法吗?我刚下载了你的项目。首先,转到故事板并单击标签,在标识符窗格中将标签值更改为100左右 在cellForItemAtIndexPath函数中,将当前实现替换为 let cell = collectionView.d

我尝试使用带有
UICollectionViewCell
的自动布局。在iOS8上运行良好,但在iOS9上崩溃。我尝试更深入地调试,但找不到任何原因。Xcode停止在
[\u UIFlowLayoutSection updateEstimatedSizeForSection]


有什么想法吗?

我刚下载了你的项目。首先,转到故事板并单击标签,在标识符窗格中将标签值更改为100左右

在cellForItemAtIndexPath函数中,将当前实现替换为

let cell = collectionView.dequeueReusableCellWithReuseIdentifier(String("LabelCell"), forIndexPath: indexPath)
let str = "dsadasdadaddsfsf"
let len = Int(rand()) % str.characters.count
let label = cell.contentView.viewWithTag(100) as! UILabel;
label.text = str.substringToIndex(str.startIndex.advancedBy(len))
cell.setNeedsLayout()
cell.layoutIfNeeded()
return cell

最后注释掉视图控制器类中的第33行

首先,插座标签有效。第二,没有第33行,自动布局是如何工作的?我有完全相同的问题