Closed pappalar closed 7 years ago
@racer1988 Can you post a sample project? It seems to me that your SCs do not confirm to IGListSectionType protocol. But need more info to find out.
Hi!
While preparing the sample project I managed to solve the issue which was due to how I was setting up the controllers and IGListKit was unable to access some IGListSectionType methods. so now the crash is resolved.
However I am unable to use generics to reuse the code from the parent class with a child controller type. but that is not a IGListKit question :D
Thanks, sorry for the issue
@racer1988 woot! Glad its resolved.
Don't worry about opening issues, others might run into the same problem so its good to have all this info in one place 😄
Hello,
I need to create multiple section controllers which differs in part of the cell setup but shares a lot of functionalities, and are all based on different subclasses of the model.
Hence I made a "abstract" Section Controller that owns a Generic "abstract" model and then every other section controller is a subclass of it, with a subclass of the generic model.
I set it up like this:
and
class RealSectionController: GenericSegmentSectionController<ChildModelClass>
so I am using a Constrained Type Variables in order to be able to access the model properties automatically casted to the right type in different methods, but it crashes in Adapter.m
with
but I can't understand if this is due to my code or if this is because the adapter is not able to cast the right controller from the generic one