Iglistkit: Start IGListCollectionView in an specific IndexPath

Created on 11 Feb 2017  路  5Comments  路  Source: Instagram/IGListKit

Hi,

How can I start an IGListCollectionView in an specified index of an array?.

What I'm trying to do is start an UIViewController with a full screen IGListCollectionView inside (with horizontal scroll and paging enable), and I passing it an array of objects, and I wish to display it in an specific index.

Could you help me please?

thanks in advance!

New issue checklist

General information

  • IGListKit version: 2.1.0
  • iOS version(s): 10.2
  • CocoaPods/Carthage version: CocoaPods 1.2.0
  • Xcode version: 8.2.1
  • Devices/Simulators affected: Simulator iPhone 7 Plus
question

Most helpful comment

@Rolvar instead of thinking about the index path, I'd suggest trying to start at a specific _object_ and _index_. If you do it that way, you should be able to use this API in your view controller's viewDidLoad or appearance methods, and pass animated:NO.

If that works, feel free to close this issue! Otherwise we can keep brainstorming 馃槃

All 5 comments

@Rolvar instead of thinking about the index path, I'd suggest trying to start at a specific _object_ and _index_. If you do it that way, you should be able to use this API in your view controller's viewDidLoad or appearance methods, and pass animated:NO.

If that works, feel free to close this issue! Otherwise we can keep brainstorming 馃槃

thanks, I'm trying to perform the scroll to a section who contains an TextField and this textfield becomes a first responder so, keyboard appears and I want to scroll and move textfield just up of the keyboard (not centerVertically), how could i achieve it?

I already do that changing height of UICollectionViewCell and perform the collectionContext?.reload(self), and works, but when collectionContext perform the reload method, the textfield resign the firstResponder and I can't able to write on it. can you help me to figure it out what I am loosing?

Thanks again

@Rolvar What I usually do is to setup a keyboard willChange or willAppear notification and scroll up the scrollView when the notification is triggered.

@zhubofei could you please share with me one sample code, I would appreciate it very much.

Looks like we're good here. going to close 馃槃

Was this page helpful?
0 / 5 - 0 ratings