Open maxifuchs opened 5 years ago
This is probably an issue with how XIBs work. We don’t use them at all in Instagram so I’m not surprised this hasn’t come up.
Can you repro the issue in an example app or better-yet unit test?
I won’t be able to work on a fix for this, but I’d gladly accept a PR!
Sent with GitHawk
General information
IGListKit
version: 3.4.0Hello, I think I found a bug: If you call
contentView.frame.size
inside yourbindViewModel
method, it returns the size of the xib (in storyboard), not the size of the cell, which was specified in thesectionController(_ sectionController: ListBindingSectionController<ListDiffable>, sizeForViewModel viewModel: Any, at index: Int)
. This bug also occurs in theIGListKit-Binding-Guide
example project.The cell still has the right size (from
sizeForViewModel
), but I’m creating a MKSnapshotter insidebindViewModel
, which unfortunately uses the wrong size of the contentView.In my project, the bug only occurs when the cell is loaded for the first time. After that,
contentView.frame.size
returns the correct size.