Group Group Group Group Group Group Group Group Group

raywenderlich.com Forums

Video Tutorial: Collection Views: Introduction

Find out what's covered in our Collection Views video tutorial series and learn about the various types of collection views used throughout iOS apps.


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

What’s the difference between this series and existing collection view series - https://www.raywenderlich.com/video-tutorials#collectionview ?

Thanks.

We try to update our tutorials periodically so they continue to work with new versions of Swift & Xcode, and so we can make improvements and cover new features introduced since the first recording. Kinda like a “second edition” of a book. This is an updated version of that series.

Will this this edition include moving cells in a collectionView beyond the visible screen for the purposes of reordering the data source? In other words drag and scroll the cell up or down to scroll the collectionView like a TableView would? In particular for layout that has different sized cells and it would retain those sizes as it moves the cells around. The earlier video did not go into that detail unfortunately.

Thanks!

Rob

Hi Rob, yes, I do cover moving cells using the drag and drop introduced to collection views in iOS 9. That’s coming up near the end of the series.

Terrific! I have a project using the new API that uses web views in the collection view cells. Moving works fine until I drag up or down beyond the visible frame. Then I am left with artifacts and empty cells. So I am looking forward to your tutorial to see what I might be doing wrong.

Are you updating the data model before or as you move the cells in the UI?

I’m calling moveItemAtIndexPath inside invalidationContextForInteractivelyMovingItems in my UICollectionViewLayout subclass. Inside moveItemAtIndexPath I move the data in my array around using remove and insert to reflect the new position. My cells vary in size. I am trying to keep the size of the cell the same as it moves; I don’t want it to resize to the destination cell size.

So, I believe I am updating the data model as I move the cells in the UI

Thank you so much for your help!

Rob

This series doesn’t seem to be visible when looking through the Video Tutorials section. The Collection View series is still the “old” one unless I’m mistaken.

I think the elves at RW have taken care of this now.