CollectionView 的 Cell 自適應相同的行數以及間距
1 min readMar 20, 2019
記錄一下,有時候我們會需要在每種裝置裡 collectionView 的 cell 都顯示相同的行數以及間距,以下這段 code 教你如何計算正確的 cell 寬度來達到需求
記錄一下,有時候我們會需要在每種裝置裡 collectionView 的 cell 都顯示相同的行數以及間距,以下這段 code 教你如何計算正確的 cell 寬度來達到需求
Distraction-free reading. No ads.
Organize your knowledge with lists and highlights.
Tell your story. Find your audience.
Read member-only stories
Support writers you read most
Earn money for your writing
Listen to audio narrations
Read offline with the Medium app