Ios 当MinimumLineSpacingForSection AT太大时,UICollectionView无法显示单元格

Ios 当MinimumLineSpacingForSection AT太大时,UICollectionView无法显示单元格,ios,uicollectionview,uicollectionviewlayout,uicollectionviewflowlayout,uicollectionviewdelegateflowlayout,Ios,Uicollectionview,Uicollectionviewlayout,Uicollectionviewflowlayout,Uicollectionviewdelegateflowlayout,UICollectionViewCell可以在将截面的最小线间距设置为足够小的值(例如0-54)时正常显示 但是,如果将其设置为55或更高,则不显示另一行的元素 我已经记录了日志,发现第9个UICollectionViewCell已在cellForItemAt处退出队列 UICollectionView如何布置UICollectionViewCell func numberOfSections(in collectionView: UICollectionView) -> Int

UICollectionViewCell可以在将截面的最小线间距设置为足够小的值(例如0-54)时正常显示

但是,如果将其设置为55或更高,则不显示另一行的元素

我已经记录了日志,发现第9个UICollectionViewCell已在
cellForItemAt
处退出队列

UICollectionView
如何布置
UICollectionViewCell

  func numberOfSections(in collectionView: UICollectionView) -> Int {
    return 1
  }
 
  func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
    return numberList.count
  }
  

  func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
    return collectionView.dequeueReusableCell(with: DemoCollectionViewCell.self, for: indexPath)
  }
  
  func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
    return CGSize(width: collectionView.frame.width/10.0, height: 44)
  }

  func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
    return 0
  }
  

  func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
    return 5
  }