ios - How to manage dequeue cell with background operations -


i have generic question uitableviewcell , uicollectionviewcell.

i need download file every cell, create background operation when create cell, user can scroll tableview/collectionview cell can recycled other row.

i can interrupt background operations inside "prepareforreuse" methods bit annoying because if operation @ 99% need restart download. decided maintain background process need way "recognize" when backgorund thread ends cell isn't same when started.

sorry if question not clear.

thanks

i don't think best approach, link background tasks cells , handle reuse.

you should create tasks when cell created , use index path identify cell should handle result of task.

in way, won't kill task , can check if task completed won't start again when user scroll table view.


Comments