Group Group Group Group Group Group Group Group Group

raywenderlich.com Forums

IGListKit Tutorial: Better UICollectionViews

Build better, more dynamic UICollectionViews with Instagram's IGListKit data-driven framework.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/811-iglistkit-tutorial-better-uicollectionviews

Hi Ryan, thank you for a great tutorial and to Instagram for open sourcing IGListKit, seems like it can add productivity day one.
How do you recommend working with dynamic layout and IGListKit together in Swift? Autolayout, AsyncDisplayKit or LayoutKit maybe?

Hi, great tutorial so far, my own implementation in an app am currently working on lasts less than 10 minutes after watching this tutorial.
But in the app, I need to get a paginated list of my data from a webservice when the user reaches the bottom of the list.

I’ve get the indexPath of the cell with collectionContext!.index(for: cell, sectionController: self) but this number is too way big (9223372036854775807 in my case) and does not correspond to my data source.

My question is, how can I get the right index for the cell.

Thank you in advance.

Best Regards.

That*s a good question.
As far as I observed it you have to calculate the size of a cell for every SectionController which means if you want to have cells with individual sizes, you need to have a new SectionController for every cell, right?
I am facing that problem right now and try to find a somehow lightweight solution.
Did you find any @jimbo?

Hey, great tutorial :smiley: (I really enjoy reading the articles and books you guys make!)

I’m just having some trouble with Xcode 8.2.1. At this point:

lazy var adapter: IGListAdapter = {
      return IGListAdapter(updater: IGListAdapterUpdater(), viewController: self, workingRangeSize: 0)
}()

Firstly, Xcode doesn’t offer auto-complete for the initializer. It auto-completes “IGListAdapter” but that’s it. Is that normal?

Secondly (and more importantly), when I try to access the adapter like this for example:

adapter.collectionView = collectionView

XCodes states that adapter is an

<<error type>>

I don’t know how to fix this. sometimes Xcode tells me that there was an “internal error”. But not all the time.

I tried this with the starter project and with the finished project. Also, I created a new project, and downloaded/installed IGListKit and I got the same results with Xcode :confused:

Does anyone have had a similar problem? Is there a fix? Am I stupid and forgot something :smiley: ?

Thanks for any help :slight_smile:

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]