Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ferb120 opened this issue Nov 7, 2022 · 1 comment

Comments

@ferb120
Copy link

ferb120 commented Nov 7, 2022

columnerror

@FlashTang
Copy link

FlashTang commented Dec 4, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants