JEKScrollableSectionCollectionViewLayout
JEKScrollableSectionCollectionViewLayout copied to clipboard
Add proper support for `scrollToItemAtIndexPath:scrollPosition:animated`
Handling correct scrolling to items required special handling in this class, since UICollectionView does not expect layouts to have items outside the scrollable bounds. It was solved by swizzling the method and forwarding it to the layout (if the layout is the correct class).
Also adds a new public API:
- (void)setHorizontalOffset:(CGFloat)offset forSectionAtIndex:(NSUInteger)index animated:(BOOL)animated;
This might improve AppleTV support, hopefully fixing the problem described in #17