i have collection view in horizontal position. user can download file, it display progress view, after download complete the progress view is fully filled with blue color but if I scroll the collection view until the file that already downloaded not visible, the progress view missing
here's my code
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
self.navigationController?.navigationBarHidden = true
}
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(true)
self.navigationController?.navigationBarHidden = true
}
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
let cell: magazineCell = self.collectionView.dequeueReusableCellWithReuseIdentifier("Cell", forIndexPath: indexPath) as! magazineCell
cell.progressDownload.hidden = true //the progress bar
cell.progressLabel.hidden = true //download percent
cell.progressDownload.setProgress(0, animated: true)
}
func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
cell.progressDownload.hidden = false
cell.progressLabel.hidden = false
}