8000 CompositionalLayout - Feature Request · Issue #30 · shoheiyokoyama/Gemini · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
CompositionalLayout - Feature Request #30
Open
@egenvall

Description

@egenvall

Hi,

Gemini seems to be not working when using a UICollectionViewDiffableDataSource along with a UICollectionViewCompositionalLayout.

The scrolling function
func scrollViewDidScroll(_ scrollView: UIScrollView)
is not called on scroll in these layouts by design, rather:

section.orthogonalScrollingBehavior = .groupPagingCentered
section.visibleItemsInvalidationHandler = { visibleItems, scrollOffset, layoutEnvironment in
                 self.collectionView.animateVisibleCells()  
}

is used to detect scrolling for each section, but calling the animation function seems to only do the animation once initially.

I'm also calling the animation in

func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {

        guard let customCell = cell as? MyCollectionCell else { return }
        self.collectionView.animateCell(customCell)
}

and its set as

collectionView.gemini.customAnimation().translation(x: 0, y: 50, z: 0).rota
4E9F
tionAngle(x: 0, y: 13, z: 0).ease(.easeOutExpo)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0