Collection Views | raywenderlich.com

Learn all about using collection views in iOS to build composable and flexible layouts both in code and using Interface Builder. You’ll learn how to implement custom cells, animate changes and work with different types of data sources


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

Hi Pasan, just wondering why, on video 19, when you were setting the selected items, you opted to changes values on the actual cell class (EmojiCell) instead of creating a property on the DataSource which you could change and reference later on if a cell isEditing or not. When you called collectionView.indexPathsForVisibleItems.forEach only the visible cells were set to isEditing which caused cells that were out of view not to be selected even if Edit mode was enabled. Shouldn’t cells just be used as containers since their state resets everytime they’re dequeued from the view. Thanks!

Please update the tutorials in collection view.