README and documentationIGListKit version: lastSo I have a IGListCollectionView that looks like UIPageViewController (horizontal scroll, paging enabled), I need to show the last cell when app loads. How can I do that?
You state that you're using the "last" (assuming latest) version of IGListKit, but as per the discussion here the IGListCollectionView has been removed in version 3.0!
Regardless IGListCollectionView was just a small wrapper of UICollectionView providing some warnings/errors when you tried to use certain methods.
You should be able to scroll the same way you would if it was just a UICollectionView using the scrollToItem(at: indexPath) method like:
collectionView.scrollToItem(at: IndexPathOfLastItem, at: .centeredHorizontally, animated: false)
Does this help?
Thanks @Sherlouk, one more question, how do I find an IndexPath for last item? I've tried few methods, but nothing has helped me :(
Well that will depend on your exact setup, but you just need to construct an IndexPath based on the size of your collection view.
Assuming you follow IGListKit recommendations and have many sections, then you _could_ do something like this:
IndexPath(item: 0, section: collectionView.numberOfSections)
@Sherlouk Thanks a lot!
We good to close this issue @folexz?
Yes, we are. Thanks a lot.
От 16 May 2017 в 18:13:38, James Sherlock ([email protected])
написал:
You state that you're using the "last" (assuming latest) version of
IGListKit, but as per the discussion here
https://github.com/Instagram/IGListKit/issues/409 the IGListCollectionView
has been removed in version 3.0!
Regardless IGListCollectionView was just a small wrapper of UICollectionView
providing some warnings/errors when you tried to use certain methods. You
should be able to scroll the same way you would if it was just a
UICollectionView using the scrollToItem(at: indexPath) method like:
collectionView.scrollToItem(at: IndexPathOfLastItem, at:
.centeredHorizontally, animated: false)
Does this help?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Instagram/IGListKit/issues/743#issuecomment-301762978,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJr626-0d6esYfd94tkge1mGhRceC-fEks5r6ZLygaJpZM4NcWWs
.
Thanks @Sherlouk !
Most helpful comment
Yes, we are. Thanks a lot.
От 16 May 2017 в 18:13:38, James Sherlock ([email protected])
написал:
You state that you're using the "last" (assuming latest) version of
IGListKit, but as per the discussion here
https://github.com/Instagram/IGListKit/issues/409 the IGListCollectionView
has been removed in version 3.0!
Regardless IGListCollectionView was just a small wrapper of UICollectionView
providing some warnings/errors when you tried to use certain methods. You
should be able to scroll the same way you would if it was just a
UICollectionView using the scrollToItem(at: indexPath) method like:
collectionView.scrollToItem(at: IndexPathOfLastItem, at:
.centeredHorizontally, animated: false)
Does this help?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Instagram/IGListKit/issues/743#issuecomment-301762978,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJr626-0d6esYfd94tkge1mGhRceC-fEks5r6ZLygaJpZM4NcWWs
.