README and documentationIGListKit version: 3.0.0I changed workingRangeSize to 1 in adapter initializer in WorkingRangeViewController.
I added some console logging just so it's easier to spot pattern.
![screen shot 2017-05-23 at 4 22 28 pm]
(https://cloud.githubusercontent.com/assets/1558441/26356636/5f79f416-3fd5-11e7-9336-468de8f54f68.png)

bash
IGListAdapter 0x60800014d1b0:
Updater type: IGListAdapterUpdater
Data source: <IGListKitExamples.DemosViewController: 0x7fbeea607860>
Collection view delegate: (null)
Scroll view delegate: (null)
Is in update block: No
View controller: <IGListKitExamples.DemosViewController: 0x7fbeea607860>
Is prefetching enabled: Yes
Registered cell classes:
{(
IGListKitExamples.LabelCell
)}
IGListAdapterUpdater instance 0x6080000c2ae0:
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:
<IGListKitExamples.DemoItem: 0x600000093c90>
<IGListKitExamples.DemoSectionController: 0x6080000ea800>
Object and section controller at section: 1:
<IGListKitExamples.DemoItem: 0x6000000931a0>
<IGListKitExamples.DemoSectionController: 0x6080000ea880>
Object and section controller at section: 2:
<IGListKitExamples.DemoItem: 0x600000093f60>
<IGListKitExamples.DemoSectionController: 0x6080000ea980>
Object and section controller at section: 3:
<IGListKitExamples.DemoItem: 0x600000097020>
<IGListKitExamples.DemoSectionController: 0x6080000eaa00>
Object and section controller at section: 4:
<IGListKitExamples.DemoItem: 0x608000099690>
<IGListKitExamples.DemoSectionController: 0x6080000eaa80>
Object and section controller at section: 5:
<IGListKitExamples.DemoItem: 0x600000097160>
<IGListKitExamples.DemoSectionController: 0x6080000e8700>
Object and section controller at section: 6:
<IGListKitExamples.DemoItem: 0x6000000971b0>
<IGListKitExamples.DemoSectionController: 0x6080000eab00>
Object and section controller at section: 7:
<IGListKitExamples.DemoItem: 0x608000099910>
<IGListKitExamples.DemoSectionController: 0x6080000eab80>
Object and section controller at section: 8:
<IGListKitExamples.DemoItem: 0x608000099870>
<IGListKitExamples.DemoSectionController: 0x6080000ea900>
Object and section controller at section: 9:
<IGListKitExamples.DemoItem: 0x6000000972f0>
<IGListKitExamples.DemoSectionController: 0x6080000eac00>
Object and section controller at section: 10:
<IGListKitExamples.DemoItem: 0x6000000973e0>
<IGListKitExamples.DemoSectionController: 0x6080000eac80>
Object and section controller at section: 11:
<IGListKitExamples.DemoItem: 0x608000099a50>
<IGListKitExamples.DemoSectionController: 0x6080000eae00>
Object and section controller at section: 12:
<IGListKitExamples.DemoItem: 0x608000099b40>
<IGListKitExamples.DemoSectionController: 0x6080000eae80>
Object and section controller at section: 13:
<IGListKitExamples.DemoItem: 0x608000099c30>
<IGListKitExamples.DemoSectionController: 0x6080000eaf00>
Object and section controller at section: 14:
<IGListKitExamples.DemoItem: 0x608000099d20>
<IGListKitExamples.DemoSectionController: 0x6080000eaf80>
Object and section controller at section: 15:
<IGListKitExamples.DemoItem: 0x6000000974d0>
<IGListKitExamples.DemoSectionController: 0x6080000eb000>
Object and section controller at section: 16:
<IGListKitExamples.DemoItem: 0x6000000975c0>
<IGListKitExamples.DemoSectionController: 0x6080000eb080>
Collection view details:
Class: UICollectionView, instance: 0x7fbeea820000
Data source: <IGListAdapter: 0x60800014d1b0>
Delegate: <IGListAdapter: 0x60800014d1b0>
Layout: <UICollectionViewFlowLayout: 0x7fbeea507450>
Frame: {{0, 0}, {375, 667}}, bounds: {{0, 0}, {375, 667}}
Number of sections: 17
1 items in section 0
1 items in section 1
1 items in section 2
1 items in section 3
1 items in section 4
1 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
1 items in section 11
1 items in section 12
1 items in section 13
1 items in section 14
1 items in section 15
1 items in section 16
Visible cell details:
Visible cell at section 0, item 0:
<IGListKitExamples.LabelCell: 0x7fbeed10d0d0; baseClass = UICollectionViewCell; frame = (0 0; 375 55); text = 'Tail Loading'; layer = <CALayer: 0x600000226c40>>
Visible cell at section 1, item 0:
<IGListKitExamples.LabelCell: 0x7fbeed10e940; baseClass = UICollectionViewCell; frame = (0 55; 375 55); text = 'Search Autocomplete'; layer = <CALayer: 0x600000227e40>>
Visible cell at section 2, item 0:
<IGListKitExamples.LabelCell: 0x7fbeed10f600; baseClass = UICollectionViewCell; frame = (0 110; 375 55); text = 'Mixed Data'; layer = <CALayer: 0x600000227940>>
Visible cell at section 3, item 0:
<IGListKitExamples.LabelCell: 0x7fbeed10fda0; baseClass = UICollectionViewCell; frame = (0 165; 375 55); text = 'Nested Adapter'; layer = <CALayer: 0x600000226de0>>
Visible cell at section 4, item 0:
<IGListKitExamples.LabelCell: 0x7fbeed110540; baseClass = UICollectionViewCell; frame = (0 220; 375 55); text = 'Empty View'; layer = <CALayer: 0x6000002271a0>>
Visible cell at section 5, item 0:
<IGListKitExamples.LabelCell: 0x7fbeed110ce0; baseClass = UICollectionViewCell; frame = (0 275; 375 55); text = 'Single Section Controller'; layer = <CALayer: 0x6000002274c0>>
Visible cell at section 6, item 0:
<IGListKitExamples.LabelCell: 0x7fbeed111480; baseClass = UICollectionViewCell; frame = (0 330; 375 55); text = 'Storyboard'; layer = <CALayer: 0x600000228800>>
Visible cell at section 7, item 0:
<IGListKitExamples.LabelCell: 0x7fbeed111c20; baseClass = UICollectionViewCell; frame = (0 385; 375 55); text = 'Single Section Storyboard'; layer = <CALayer: 0x600000228c80>>
Visible cell at section 8, item 0:
<IGListKitExamples.LabelCell: 0x7fbeed1123c0; baseClass = UICollectionViewCell; frame = (0 440; 375 55); text = 'Working Range'; layer = <CALayer: 0x600000229100>>
Visible cell at section 9, item 0:
<IGListKitExamples.LabelCell: 0x7fbeed112f60; baseClass = UICollectionViewCell; frame = (0 495; 375 55); text = 'Diff Algorithm'; layer = <CALayer: 0x600000229580>>
Visible cell at section 10, item 0:
<IGListKitExamples.LabelCell: 0x7fbeed113700; baseClass = UICollectionViewCell; frame = (0 550; 375 55); text = 'Supplementary Views'; layer = <CALayer: 0x600000229a00>>
IGListAdapter 0x60800014d100:
Updater type: IGListAdapterUpdater
Data source: <IGListKitExamples.WorkingRangeViewController: 0x7fbeea412330>
Collection view delegate: (null)
Scroll view delegate: (null)
Is in update block: No
View controller: <IGListKitExamples.WorkingRangeViewController: 0x7fbeea412330>
Is prefetching enabled: Yes
Registered cell classes:
{(
IGListKitExamples.ImageCell,
IGListKitExamples.LabelCell
)}
IGListAdapterUpdater instance 0x6080000c7ee0:
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:
327
<IGListKitExamples.WorkingRangeSectionController: 0x608000126040>
Object and section controller at section: 1:
229
<IGListKitExamples.WorkingRangeSectionController: 0x608000126180>
Object and section controller at section: 2:
311
<IGListKitExamples.WorkingRangeSectionController: 0x608000126cc0>
Object and section controller at section: 3:
286
<IGListKitExamples.WorkingRangeSectionController: 0x6080001260e0>
Object and section controller at section: 4:
279
<IGListKitExamples.WorkingRangeSectionController: 0x608000126220>
Object and section controller at section: 5:
204
<IGListKitExamples.WorkingRangeSectionController: 0x608000124c40>
Object and section controller at section: 6:
334
<IGListKitExamples.WorkingRangeSectionController: 0x608000125f00>
Object and section controller at section: 7:
315
<IGListKitExamples.WorkingRangeSectionController: 0x608000126d60>
Object and section controller at section: 8:
360
<IGListKitExamples.WorkingRangeSectionController: 0x608000125fa0>
Object and section controller at section: 9:
241
<IGListKitExamples.WorkingRangeSectionController: 0x608000126fe0>
Object and section controller at section: 10:
242
<IGListKitExamples.WorkingRangeSectionController: 0x608000126f40>
Object and section controller at section: 11:
313
<IGListKitExamples.WorkingRangeSectionController: 0x608000126ea0>
Object and section controller at section: 12:
208
<IGListKitExamples.WorkingRangeSectionController: 0x608000127120>
Object and section controller at section: 13:
398
<IGListKitExamples.WorkingRangeSectionController: 0x608000127080>
Object and section controller at section: 14:
382
<IGListKitExamples.WorkingRangeSectionController: 0x608000126e00>
Object and section controller at section: 15:
250
<IGListKitExamples.WorkingRangeSectionController: 0x608000127300>
Object and section controller at section: 16:
330
<IGListKitExamples.WorkingRangeSectionController: 0x608000127260>
Object and section controller at section: 17:
218
<IGListKitExamples.WorkingRangeSectionController: 0x6080001271c0>
Object and section controller at section: 18:
304
<IGListKitExamples.WorkingRangeSectionController: 0x6080001274e0>
Object and section controller at section: 19:
260
<IGListKitExamples.WorkingRangeSectionController: 0x608000127440>
Collection view details:
Class: UICollectionView, instance: 0x7fbeea82d000
Data source: <IGListAdapter: 0x60800014d100>
Delegate: <IGListAdapter: 0x60800014d100>
Layout: <UICollectionViewFlowLayout: 0x7fbeea407ac0>
Frame: {{0, 0}, {375, 667}}, bounds: {{0, 2067}, {375, 667}}
Number of sections: 20
2 items in section 0
2 items in section 1
2 items in section 2
2 items in section 3
2 items in section 4
2 items in section 5
2 items in section 6
2 items in section 7
2 items in section 8
2 items in section 9
2 items in section 10
2 items in section 11
2 items in section 12
2 items in section 13
2 items in section 14
2 items in section 15
2 items in section 16
2 items in section 17
2 items in section 18
2 items in section 19
Visible cell details:
Visible cell at section 6, item 1:
<IGListKitExamples.ImageCell: 0x7fbeea50c280; baseClass = UICollectionViewCell; frame = (0 2021; 375 334); layer = <CALayer: 0x608000030140>>
Visible cell at section 7, item 0:
<IGListKitExamples.LabelCell: 0x7fbeea50ce20; baseClass = UICollectionViewCell; frame = (0 2355; 375 55); text = 'https://unsplash.it/375.0...'; layer = <CALayer: 0x60800002dca0>>
Visible cell at section 7, item 1:
<IGListKitExamples.ImageCell: 0x7fbeea62c0b0; baseClass = UICollectionViewCell; frame = (0 2410; 375 315); layer = <CALayer: 0x60800002a760>>
Visible cell at section 8, item 0:
<IGListKitExamples.LabelCell: 0x7fbeea505db0; baseClass = UICollectionViewCell; frame = (0 2725; 375 55); text = 'https://unsplash.it/375.0...'; layer = <CALayer: 0x60800002aa40>>
@rnystrom @jessesquires Requiring a little bit of help on this one:
Having put a bunch of prints I've found out that, all in the WorkingRangeSectionController, that in the case where the image doesn't load - cellForItem (protocol method) is called (with nil for the downloadedImage) just a fraction of a second before the success state of the network request downloading the image.
However, the call to collectionContext?.cellForItem, at this point in time, returns nil therefore we can't set the image at that point to newly downloaded image.
I think that returning of nil is what is causing these images to stay blank (in combination with awkward timed network requests).
I've looked a little in the ObjC side of things to find out why that was returning nil and have come across this block of code which I'm thinking may be what's causing the issue? This would make sense sort of sense as both of the flags have a high likelihood of being true. It's just (within the past second) dequeued the cell, and it is, albeit in an async block, being triggered by the working range update method.
Again it's likely this is caused by unfortunate timing, but I don't see our actions here as an unusual activity
Thanks for the investigation @Sherlouk ! 馃
@SergeRykovski @Sherlouk Can you still repro this bug in the latest build? Everything works fine for me now.
Sent with GitHawk
@zhubofei No. Looks like it's fixed now.