Free Porn
xbporn

https://www.bangspankxxx.com
20.6 C
New York
Friday, September 20, 2024

ios – Is there any solution to utilizing UICollectionViewCell’s self-sizing solely in vertical course?


I’m writing a demo concerning the distinction utilizing compositional structure & conventional circulation structure with UICollectionView .

I discovered that If I wanna the cell’s width equal to the UICollectionView’s width , however the cell’s peak is decided by the cell’s content material (self-sizing solely in vertical).

  1. this may be simply with compositional structure
    let peak = NSCollectionLayoutDimension.estimated(144)
    let itemSize = NSCollectionLayoutSize(widthDimension: NSCollectionLayoutDimension.fractionalWidth(1), heightDimension: peak)
  1. however If I utilizing conventional circulation structure. I can solely set circulation structure’s
    estimatedItemSize like this
    structure.estimatedItemSize = CGSizeMake(collectionView.width, 140)

however after structure, the cell’s closing width will at all times decided by the precise content material , not the width equal to collectionView’s width.

Is there any greatest follow about this type vertical-only self-sizing?

Related Articles

Social Media Auto Publish Powered By : XYZScripts.com