mirror of
https://github.com/neon443/StickerSlack.git
synced 2026-11-30 12:44:51 +00:00
asfdk
This commit is contained in:
1 file changed
+2
-2
@@ -80,8 +80,8 @@ class PlainEmojiCollectionViewCell: UICollectionViewCell {
|
|||||||
cols = max(1, floor(availWidth/width))
|
cols = max(1, floor(availWidth/width))
|
||||||
}
|
}
|
||||||
let totalSpacing = ((collectionView.collectionViewLayout as? UICollectionViewFlowLayout)?.minimumInteritemSpacing ?? 0) * (cols-1)
|
let totalSpacing = ((collectionView.collectionViewLayout as? UICollectionViewFlowLayout)?.minimumInteritemSpacing ?? 0) * (cols-1)
|
||||||
let itemWidth = (availWidth-totalSpacing)/cols
|
let itemWidth = ((availWidth-totalSpacing)/cols).rounded(.down)
|
||||||
layoutAttributes.size = CGSize(width: itemWidth.rounded(.down), height: itemWidth.rounded(.down))
|
layoutAttributes.size = CGSize(width: itemWidth, height: itemWidth)
|
||||||
return layoutAttributes
|
return layoutAttributes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||