DisplaySwitcher icon indicating copy to clipboard operation
DisplaySwitcher copied to clipboard

First animation broken when starting using a .grid layout

Open Drusy opened this issue 7 years ago • 0 comments

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

Drusy avatar Apr 05 '18 16:04 Drusy