I'm trying to develop a progress view inside UITableViewCell
.
In my first realization I used AFHTTPRequestOperation
and its setDownloadProgressBlock:^
inside my cell.
Later my goal became more complicated. I have one UITableView
that displays different content (song playlists). The same song might exits in several playlists. When I start to download the song in one playlist and switch to another (which also contains this song) I want to see the download progress like in the first playlist.
I have succeeded to make it work. At the beginning of download process I create a progress view in global class. To show this progress view on the cell I just use addSubview
removeFromSuperview
. But I don't like this way because I have to add the progress view on top of existing progress view (because every cell has its own progress view due to application design).
Now I use another approach. When I show the cell I set setDownloadProgressBlock:^
to an existing progress view. I works fine but when I open another playlist the progress is shown on the other song. I bet it is because of reusable cells I use.
I'm a bit tired of implementing this thing, any ideas how to make it work properly?