Instagram / IGListKit

A data-driven UICollectionView framework for building fast and flexible lists.
https://instagram.github.io/IGListKit/
MIT License
12.87k stars 1.54k forks source link

can't set stickyHeaders` in Storyboard for IGListCollectionViewLayout #895

Open aelam opened 7 years ago

aelam commented 7 years ago

New issue checklist

stickyHeaders is a readonly property and if we initialize it from XIB or storyboard. we have no chance to set it to YES or modify it.

- (instancetype)initWithCoder:(NSCoder *)aDecoder {    
   return [self initWithStickyHeaders:NO topContentInset:0 stretchToEdge:NO]; 
}

General information

Debug information

# Please include debug logs using the following lldb command:
po [IGListDebugger dump]
rnystrom commented 7 years ago

Ya, this is honestly just a limitation of storyboards. We could maybe make this a property editable from SB, tho it's my super high pri.

rnystrom commented 7 years ago

One recommendation is to just change the layout in code after things load.

jessesquires commented 7 years ago

I think we can mark this as IB_DESIGNABLE and it will show up in IB

rnystrom commented 7 years ago

I can't remember if there is extra work that the layout does in init with sticky headers. I don't think so. We can move this to a designable propane phase out the initializer. Plus we are gonna make breaking changes to the init in 4.0 anyways after the h scroll support.

Cools?