mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-23 01:08:27 +00:00
Add containerContentOffset to IGListCollectionContext
Summary: **In this diff** Add `containerContentOffset` to `IGListCollectionContext` - In this stack, I check this value from the product tile and content tile section controllers to determine how far the user has scrolled down the containing scroll view **In this stack** Add `scroll_logging_info` to product card and content tile events to track scroll depth on the Shop Tab homepage - Project plan: https://fb.quip.com/mF9qAnGPE8CI - Logging spec: https://fb.quip.com/6wp7AO63d8Wb#LPWACADjpNK Differential Revision: D27793071 fbshipit-source-id: 22123511b0f85fd636d82981671ccda0b0d7db7d
This commit is contained in:
parent
6f7cee5345
commit
7c2b48151e
2 changed files with 9 additions and 0 deletions
|
|
@ -943,6 +943,10 @@
|
|||
return UIEdgeInsetsInsetRect(collectionView.bounds, collectionView.ig_contentInset).size;
|
||||
}
|
||||
|
||||
- (CGPoint)containerContentOffset {
|
||||
return self.collectionView.contentOffset;
|
||||
}
|
||||
|
||||
- (IGListCollectionScrollingTraits)scrollingTraits {
|
||||
UICollectionView *collectionView = self.collectionView;
|
||||
return (IGListCollectionScrollingTraits) {
|
||||
|
|
|
|||
|
|
@ -42,6 +42,11 @@ NS_SWIFT_NAME(ListCollectionContext)
|
|||
*/
|
||||
@property (nonatomic, readonly) CGSize insetContainerSize;
|
||||
|
||||
/**
|
||||
The content offset of the collection view.
|
||||
*/
|
||||
@property (nonatomic, readonly) CGPoint containerContentOffset;
|
||||
|
||||
/**
|
||||
The current scrolling traits of the underlying collection view.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue