Skip to content

First animation broken when starting using a .grid layout #38

@Drusy

Description

@Drusy

Report

The first layout transition is broken if the first layout configuration is .grid

Report a bug

What did you do?

Update the example project with the following:

    fileprivate var layoutState: LayoutState = .grid

    fileprivate func setupCollectionView() {
        collectionView.collectionViewLayout = gridLayout
        // ...
    }

What did you expect to happen?

Proper animation for the layout transition

What happened instead?

The first animation is not smooth and flickers

Your Environment

  • Version of the component: a02d5a1
  • Swift version: 4.1
  • iOS version: 11.2.6
  • Device: Simulator iPhone X / iPhone 6Plus
  • Xcode version: 9.3
  • If you use Carthage: 0.29.0

Project that demonstrates the bug

Simply updating your example project with the code previously provided:

  1. Update initial layout in the setupCollectionView method for a gridLayout.
  2. Update the initial layoutState to .grid

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions