mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-23 17:28:22 +00:00
Replace incorrect IGListSectionController dequeue calls
Summary: Some calls to cellForItemAtIndex: on IGListSectionController expect this method to return a reference to an existing, already dequeued cell. It doesn't do this - it dequeues a new cell instance and returns that. Added a warning note to the docs. Reviewed By: lorixx Differential Revision: D13222395 fbshipit-source-id: bb7a80f9f005e2675eef3d01a236a5f9f0008b46
This commit is contained in:
parent
f743df8a0e
commit
b9486a104c
1 changed files with 4 additions and 0 deletions
|
|
@ -57,6 +57,10 @@ NS_SWIFT_NAME(ListSectionController)
|
|||
will be used on screen. You should never allocate new cells in this method, instead use the provided adapter to call
|
||||
one of the dequeue methods on the IGListCollectionContext. The default implementation will assert. **You must override
|
||||
this method without calling super.**
|
||||
|
||||
@warning Don't call this method to obtain a reference to currently dequeued cells: a new cell will be dequeued
|
||||
and returned, rather than the existing cell that you may have intended to retrieve. Instead, you can call
|
||||
`-cellForItemAtIndex:sectionController:` on `IGListCollectionContext` to obtain active cell references.
|
||||
*/
|
||||
- (__kindof UICollectionViewCell *)cellForItemAtIndex:(NSInteger)index;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue