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

Custom contentInset breaks the layout #37

Open
Drusy opened this issue Apr 5, 2018 · 0 comments
Open

Custom contentInset breaks the layout #37

Drusy opened this issue Apr 5, 2018 · 0 comments

Comments

@Drusy
Copy link

Drusy commented Apr 5, 2018

Report

Settings a custom contentInset on the collection view breaks the layout after changing the layout several times

Report a bug

What did you do?

Update the example code with the following:

    @IBOutlet fileprivate weak var collectionView: UICollectionView! {
        didSet {
            collectionView.contentInset = UIEdgeInsets(top: 4, left: 4, bottom: 4, right: 4)
        }
    }

What did you expect to happen?

Set the custom contentInset on the collection view and display cells normally

What happened instead?

The custom contentInset seems to be used but the layout is broken, there is a huge empty space before the first cell appear and the layout animation 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 on the UICollectionView outlet.

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

No branches or pull requests

2 participants