ios - 为什么 autosize collectionview 单元格不起作用?
<p><p>据我所知,如果您将 <code>collectionviewlayout</code> 的 <code>estimatedItemSize</code> 设置为非零值,则会开始自动调整大小,但它对我不起作用.</p>
<p>您可以获得工作副本<a href="https://drive.google.com/open?id=1bREZOxB0NO7oYnmRSBJKCs219EBnZx9j" rel="noreferrer noopener nofollow">here</a>如果你想玩它。</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>我假设您已经了解 systemLayoutSizeFitting?</p>
<p>我认为这已经得到了回答。看看<a href="https://stackoverflow.com/users/1652402/daniel-galasko" rel="noreferrer noopener nofollow">Daniel Galasko</a>的答案,在这里:</p>
<p> <a href="https://stackoverflow.com/questions/25895311/uicollectionview-self-sizing-cells-with-auto-layout?answertab=votes#tab-top" rel="noreferrer noopener nofollow">UICollectionView Self Sizing Cells with Auto Layout</a> </p>
<p>在他的回答中,他甚至引用了一个他放在一起的 GitHub 项目,你可以下载和玩:</p>
<p> <a href="https://github.com/danielgalasko/DGSelfSizingCollectionViewCells/tree/master" rel="noreferrer noopener nofollow">https://github.com/danielgalasko/DGSelfSizingCollectionViewCells/tree/master</a> </p></p>
<p style="font-size: 20px;">关于ios - 为什么 autosize collectionview 单元格不起作用?,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/54869139/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/54869139/
</a>
</p>
页:
[1]