Beginning Collection Views - Part 17: Section 2: | Ray Wenderlich

Subclass UICollectionViewFlowLayout to get custom functionality such as animating cells that are added.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4448-beginning-collection-views/lessons/17

After completing part 17, the program seems to work as described, but noticed that the section count does not get updated if we add a new item to a section currently on screen. If I force the section off screen, then bring that section back on, the count is updated. I know we can’t call reloaddata, so what would be fix for this? Should we add a call to update the section count when we add an item?

I’m not understanding. Why do we check for item.representedElementKind == nil before doing the code that follows? Saying it out loud, it’s saying if the represent element kind is nothing, then set it’s frame. Why do we then assume it’s a cell? What else could it be?

Thanks.

@catie Can you please help with this when you get a chance? Thank you - much appreciated! :]