Download queue with option to remove or add itens in swift 4

时间:2018-02-01 18:26:24

标签: ios swift memory download queue

I want to create a download queue to make some requests in background.

I have a tableView, and when a click in a cell, one download start to show any detail. I want to start download when I'm still in tableView and dind't click in any cell. So, I want to start downloads before user click, to make things faster.

For example, if I have 7 cells with theirs requests (when clicked). But I want to antecipate this and with a queue start download of first cell, and after, second, etc...

And if a clicked in fifth cell, I put this download in top of queue.

I search about this, but GCD didn`t apply for what I want.

Thanks in advance.

EDIT:

I want one download per time. And when user click, make this download the first and pause the other.

0 个答案:

没有答案