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

performUpdates not updating cell size especially on the last section item #1553

Open
delmarz opened this issue Jan 30, 2022 · 0 comments
Open

Comments

@delmarz
Copy link

delmarz commented Jan 30, 2022

New issue checklist

  • [/ ] I have reviewed the README and documentation
  • [ /] I have searched existing issues and this is not a duplicate
  • [/ ] I have attempted to reproduce the issue and include an example project.

General information

  • IGListKit version: 4.0.0
  • iOS version(s): 15.2
  • CocoaPods/Carthage version:
  • Xcode version: 13
  • Devices/Simulators affected: All device
  • Reproducible in the demo project? (Yes/No):
  • Related issues:

Debug information

# Please include debug logs using the following lldb command:
po [IGListDebugger dump]

I have the app the in every section can able to click "show more" to expand cell size. The 'show more' functionality working well on on the setup the only problem is when I click the last item it doesn't update the cell bottom inset

extension ExperienceDetailSectionController: ExperiencesDetailCellDelegate {
    func experiencesDetailCellDidTapShowMore(_ experiencesDetailCell: ExperiencesDetailCollectionViewCell) {
        collectionContext?.performBatch(animated: true, updates: { [weak self] (context) in
            guard let strongSelf = self else { return }
            strongSelf.sectionModel.isExpanded = true
            context.reload(strongSelf)
        }, completion: nil)
    }
}

    override func sizeForItem(at index: Int) -> CGSize {
        guard let context = collectionContext else { return .zero }
        let width = context.containerSize.width
        return ExperiencesDetailCollectionViewCell.cellSize(forCellModel: sectionModel.cellModel, allowedWidth: width)
    }

Is there anyway I can update the last section to set the bottom cell inset ?

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

No branches or pull requests

1 participant