tilltue / TLPhotoPicker

📷 multiple phassets picker for iOS lib. like a facebook
MIT License
1.88k stars 332 forks source link

BLANK WHITE MIDDLE COLUMN for newer iphone models, please let me know if there is a fix for this #346

Open ferb120 opened 1 year ago

ferb120 commented 1 year ago

columnerror

FlashTang commented 1 year ago

I don't know the bug , since I don't have the new device But I tried to custom the cell I think you can try add "sizeForItemAt" to UICollectionViewDelegateFlowLayout The tricky part is "-1"

public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
        let wid = (view.bounds.size.width - (padding * 2) - 1 - spaceX * CGFloat(cellPerLine - 1)) / CGFloat(cellPerLine)
        return CGSize(width: wid, height: wid)
    }

Hope it helps