Iglistkit: IGListBindingSectionController object property should probably be public

Created on 21 Mar 2017  路  4Comments  路  Source: Instagram/IGListKit

I want my IGListBindingSectionController subclass to be able to implement IGListSupplementaryViewSource. To do that I need access to the section object. Given the fact that the object (the section model in my case) is a private property on IGListBindingSectionController, it can not contain this type of information any more (not accessible)

An option is to represent the supplementary view (a header in my case) as a cell with its own viewModel (what I am doing now) but I would still think this should be available. Thoughts?

IGListBindingSectionController implementation file:

skjermbilde 2017-03-21 kl 20 25 41

proposal

Most helpful comment

Are we ok with it being id object (which will be Any in Swift) and letting callers check/cast the object? Not sure if we should try any fancy ObjC generics here.

No need for generics here in my eyes, but now that you mentioned it 馃 It would be neat

Other than that, IGListBindingSectionController is sweeet :)

Maybe I can open a PR tomorrow?

All 4 comments

Good point, it probably should.

Are we ok with it being id object (which will be Any in Swift) and letting callers check/cast the object? Not sure if we should try any fancy ObjC generics here.

Are we ok with it being id object (which will be Any in Swift) and letting callers check/cast the object? Not sure if we should try any fancy ObjC generics here.

No need for generics here in my eyes, but now that you mentioned it 馃 It would be neat

Other than that, IGListBindingSectionController is sweeet :)

Maybe I can open a PR tomorrow?

@heumn all you!

If possible, lightweight ObjC generics would probably be nice

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jessesquires picture jessesquires  路  3Comments

Przemyslaw-Wosko picture Przemyslaw-Wosko  路  3Comments

kanumuri9593 picture kanumuri9593  路  3Comments

FazeelAkhtar picture FazeelAkhtar  路  3Comments

jessesquires picture jessesquires  路  3Comments