Reputation: 388
IGListKit Library Link: https://github.com/Instagram/IGListKit
Im making different section cell using IGListKit. I successfuly done this task but i cant be able to add headers for different sections using iglistKit
Upvotes: 2
Views: 4620
Reputation: 2717
As of IGListKit 2.1, consider class and protocol names prefixed by IG
. This prefix was removed starting at 3.0.
In your section controller class, besides inheriting from IGListSectionController
(and implementing IGListSectionType
, on IGListKit 2.x), you'll also need to implement IGListSupplementaryViewSource
and set to your section controller self.supplementaryViewSource = self
.
You may want to check in the IGListKit official examples the class FeedItemSectionController
.
Of course, you could also implement this protocol in a separate entity, but actually IGListKit was not designed for that. My team was able to do it by adding some more complexity in the way the section controller injects some of its data into this separate IGListSupplementaryViewSource
implementer.
Upvotes: 11