ios - ProgressView not showing in all UICollectionViewCells -


My problem is that progression is only visible in the first 2 cells. What's wrong with my code?

Note: Scroll my collection view horizontally and each cell contains the full screen. I think that something like this can happen because I tried to show all the rooms in the same scene and they work fine, they show all progressiveness.

Edit code:

  - See the (UICollectionViewCell *) collection: (UICollectionView *) collectionView cellForItemAtIndexPath: (NSIndexPath *) indexPath {static NSString * CellIdentifier = @ "Sail"; Clothing- DetailCell * cell = (Clothing- DietCell *) [see dequeueReusableCellWithReuseIdentifier: cell identifier for indexpath: indexpath]; Cell.progressView.hidden = NO; [Cell. Progress progression set progress: 0.02]; PFFile * storeLooks = [self.vestimenta objectForKey: [NSString stringWithFormat: @ "image_% ld", (long) indexPath.item]]; NSMutableString * precio = [NSMutableString string]; (NSString * precios [self.vestimenta objectForKey: [NSString stringWithFormat: @ "precios_% ld", (long) indexPath.item]]) [[precio attached format: @ "% @ \ n", precios];} [ StoreLooks getDataInBackgroundWithBlock: ^ (NSData * Data, NSError * Error) {If (! Error & amp; amp; amp; amp; data length = gt; 0) {cell. image file. } And {cell.progressView.hidden = yes; }} Progress block: ^ (integer percent donation) {float percentage = percentage dan * 0.02; [Cell. Progress progression set progress: percent]; If (percent din == 100) {cell.progressView.hidden = yes; } Else {cell.progressView.hidden = NO; }}]; Return cell; } Instead of deleting the progress view from the cell, you should just     

.

In this way when cells are reused, the progress view will be present, and then you can set setHidden: NO that cell when you want to start loading stuff In.

Be careful with the progress block in your cells after reuse. If the cell is reused, remember to cancel the loading operation or make sure that the progress block only continues to update the cell if the cell is not reused for any different data item.


For example, I would like progress to 0. where you can see a progression scene:

  Clothing- DietCell * cell = (wasteing duties *) [collectionView dequeueReusableCellWithReuseIdentifier: cellIdentifier forIndexPath: indexPath]; Cell.progressView.hidden = NO; [Cell. Progress progression set progress: 0];  

And because you are hiding progress when loading the data, I'll just get rid of this code in progress block:

  Don == 100) {cell.progressView.hidden = yes; } Else {cell.progressView.hidden = NO; }  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -