synesthesia-it / Boomerang

Swift micro-framework for MVVM (Model-View-ViewModel) native applications.
MIT License
36 stars 10 forks source link

BoundingBox is broken #34

Closed Oni-zerone closed 3 years ago

Oni-zerone commented 3 years ago

BoundingBox calculation in UICollectionView+Sizing.swift is broken:

func boundingBox(for collectionView: UICollectionView) -> CGSize {
        let width = collectionView.bounds.width - collectionView.contentInset.left - collectionView.contentInset.right
        let height = collectionView.bounds.height - collectionView.contentInset.top - collectionView.contentInset.top
        return CGSize(width: width,
                      height: height)
    }

contentInset.top is considered two times, also I had to change contentInset with adjustedContentInset to make it work