Iglistkit: [Q] Responding on scroll

Created on 17 May 2017  路  3Comments  路  Source: Instagram/IGListKit

General information

  • IGListKit version: 2.0
  • iOS version(s): 10.3
  • CocoaPods/Carthage version: 1.2
  • Xcode version: 8.3.2

I managed to attach my view controller as delegate to scroll of IGCollection from other view, but now I'm struggling to get the information about scrolling direction (calculated with content offset for normal scroll views). Can anyone give me some tip how to get data about how collection content got scrolled?

question

Most helpful comment

Thanks @krysztalzg !

You can set the scrollViewDelegate on your list adapter to get these events, then everything is the same as if you were listening for events on any scroll view or collection view.

https://instagram.github.io/IGListKit/Classes/IGListAdapter.html#/c:objc(cs)IGListAdapter(py)scrollViewDelegate

All 3 comments

Thanks @krysztalzg !

You can set the scrollViewDelegate on your list adapter to get these events, then everything is the same as if you were listening for events on any scroll view or collection view.

https://instagram.github.io/IGListKit/Classes/IGListAdapter.html#/c:objc(cs)IGListAdapter(py)scrollViewDelegate

Oh also, we released 3.0. I'd definitely recommend upgrading 馃槃

Okay, after updating I managed to get content offset value, but now I have other problem.
My view contains three vertically align stackviews and when collection gets scrolled down I hide top and bottom stacks. With UIScrollView it works, but with ListCollection when middle stack resized (after other two disappear) it scrolls up which makes those two other stacks to appear again when they aren't supposed to.

Found a bug in my code, the problem was when scroll delegate got called with same content offset as previous. Thanks for help and great work with new version 馃槂

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PhilCai1993 picture PhilCai1993  路  3Comments

kanumuri9593 picture kanumuri9593  路  3Comments

iwasrobbed picture iwasrobbed  路  3Comments

rnystrom picture rnystrom  路  3Comments

HarshilShah picture HarshilShah  路  3Comments