Iglistkit: collectionViewContentSize bug

Created on 2 Aug 2018  Â·  6Comments  Â·  Source: Instagram/IGListKit

New issue checklist

When I use custom collectionViewLayout ,set collectionViewContentSize。That method ‘cellForItemAtIndex’ does not execute。

General information

  • IGListKit version: 3.4.0
  • iOS version(s):iOS 11
  • CocoaPods/Carthage version:
  • Xcode version:xcode 9.3
  • Devices/Simulators affected:
  • Reproducible in the demo project? (Yes/No):
  • Related issues:

Debug information

```bash

Please include debug logs using the following lldb command:

po [IGListDebugger dump]
```IGListAdapter 0x60000019a340:
Updater type: IGListAdapterUpdater
Data source:
Collection view delegate: (null)
Scroll view delegate:
Is in update block: No
View controller:
Is prefetching enabled: No
Registered cell classes:
<__NSSetM 0x6000004361e0> {(
PAAdvertiseItemCell,
PAGridItemCell,
PATitleDetailIconItemCell,
PATitleMoreItemCell
)}
IGListAdapterUpdater instance 0x6000000d0e60:
Moves as deletes+inserts: No
Allows background reloading: Yes
Has queued reload data: No
Queued update is animated: Yes
State: Idle
Section map details:
Object and section controller at section: 0:


Object and section controller at section: 1:


Object and section controller at section: 2:


Object and section controller at section: 3:


Object and section controller at section: 4:


Object and section controller at section: 5:


Object and section controller at section: 6:


Object and section controller at section: 7:


Object and section controller at section: 8:


Object and section controller at section: 9:


Object and section controller at section: 10:


Collection view details:
Class: UICollectionView, instance: 0x7fdb0c8bda00
Data source:
Delegate:
Layout:
Frame: {{0, 0}, {414, 687}}, bounds: {{0, 0}, {414, 687}}
Number of sections: 11
1 items in section 0
8 items in section 1
1 items in section 2
4 items in section 3
1 items in section 4
2 items in section 5
1 items in section 6
1 items in section 7
1 items in section 8
1 items in section 9
1 items in section 10
Visible cell details:
Visible cell at section 0, item 0:
>
Visible cell at section 1, item 0:
>
Visible cell at section 1, item 1:
>
Visible cell at section 1, item 2:
>
Visible cell at section 1, item 3:
>
Visible cell at section 1, item 4:
>
Visible cell at section 1, item 5:
>
Visible cell at section 1, item 6:
>
Visible cell at section 1, item 7:
>
Visible cell at section 2, item 0:
>
Visible cell at section 3, item 0:
>
Visible cell at section 3, item 1:
>
Visible cell at section 3, item 2:
>
Visible cell at section 3, item 3:
>
Visible cell at section 4, item 0:
>
Visible cell at section 5, item 0:
>
Visible cell at section 5, item 1:
>
IGListAdapter 0x60400018b530:
Updater type: IGListAdapterUpdater
Data source: (null)
Collection view delegate: (null)
Scroll view delegate: (null)
Is in update block: No
View controller:
Is prefetching enabled: No
IGListAdapterUpdater instance 0x6040000ce850:
Moves as deletes+inserts: No
Allows background reloading: Yes
Has queued reload data: No
Queued update is animated: Yes
State: Idle
Section map details:
Collection view details:
IGListAdapter 0x604000189240:
Updater type: IGListAdapterUpdater
Data source:
Collection view delegate: (null)
Scroll view delegate:
Is in update block: No
View controller:
Is prefetching enabled: No
Registered supplementary view identifiers:
<__NSSetM 0x600000623f80> {(
"UICollectionElementKindSectionHeaderPATitleCollectionReusableView",
"UICollectionElementKindSectionHeaderPAHeaderPickerReusableView"
)}
IGListAdapterUpdater instance 0x6040000d0140:
Moves as deletes+inserts: No
Allows background reloading: Yes
Has queued reload data: No
Queued update is animated: Yes
State: Executed batch update block
Section map details:
Object and section controller at section: 0:


Object and section controller at section: 1:


Object and section controller at section: 2:


Object and section controller at section: 3:


Object and section controller at section: 4:


Object and section controller at section: 5:


Object and section controller at section: 6:


Object and section controller at section: 7:


Object and section controller at section: 8:


Object and section controller at section: 9:


Object and section controller at section: 10:


Object and section controller at section: 11:


Object and section controller at section: 12:


Object and section controller at section: 13:


Object and section controller at section: 14:


Object and section controller at section: 15:


Collection view details:
Class: UICollectionView, instance: 0x7fdb0c935200
Data source:
Delegate:
Layout:
Frame: {{0, 0}, {414, 623}}, bounds: {{0, -54}, {414, 623}}
Number of sections: 16
1 items in section 0
1 items in section 1
2 items in section 2
2 items in section 3
4 items in section 4
3 items in section 5
8 items in section 6
3 items in section 7
11 items in section 8
2 items in section 9
1 items in section 10
4 items in section 11
2 items in section 12
1 items in section 13
1 items in section 14
1 items in section 15
Visible cell details:

missing-info question

All 6 comments

@fengBernard what do you mean by setting the content size? The content size is calculated from the layout attributes of the entire list.

Sent with GitHawk

//UICollectionViewFlowLayout.h
//- (CGSize)collectionViewContentSize{
//
//}

As long as I use this method, IGList will be invalid.

@fengBernard do you think you could make a sample project demonstrating what is wrong? I’m afraid I still don’t understand what the issue is

Sent with GitHawk

OK, wait a minute.

Sorry, that is my problem. I set the width to 0 when I set the collectionViewContentSize.

Was this page helpful?
0 / 5 - 0 ratings