I'm going crazy, I'm trying to update the progressBar from UICollectionViewCelll , when I upload a file, I tried everything, everything, this is my last attempt, I created a subclass of UICollectionViewCell associated with the xib file:
NSLog setProgressiveDownloadProgressBlock works fine, I can see all the bytes that I download, but progressBar does not update itself, it always remains at zero ... I canβt figure out how to do this ... and this is how I display the cell and call the method to load :
- (void)startDownload:(NSString *)downloadUrl { //DocumentCell *cell = (DocumentCell *)[self.collectionView cellForItemAtIndexPath:self.downloadPath]; i have tried also in this way DocumentCell *cell = (DocumentCell *)[self.collectionView dequeueReusableCellWithReuseIdentifier:CellIdentifier forIndexPath:self.downloadPath]; [cell downloadDocumentWithUrl:requestUrl]; } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. UINib *cellNib = [UINib nibWithNibName:@"DocumentCell" bundle:nil]; [self.collectionView registerNib:cellNib forCellWithReuseIdentifier:CellIdentifier]; ... } - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { DocumentCell *cell = (DocumentCell *)[collectionView dequeueReusableCellWithReuseIdentifier:CellIdentifier forIndexPath:indexPath]; cell.documentImage.....etc return cell; }
Can anybody help me? the file upload method is called, the nslog of the byte is loaded, the progress bar does not work ... please help me update this progress bar ...
Piero source share