title: Downloading Progrees hud hides on scrolling in uitableview cell
body: <p>cell for row atindexPath delegate code:</p>
  
  <pre><code>        if ([[[chatArray objectAtIndex:indexPath.row] objectForKey:@"chat_type"] isEqualToString:@"2"])//video
          {
  
              UIImageView *bg = [[UIImageView alloc]init];
  
              UIImageView* chatImg = [[UIImageView alloc]init];
  
              UIButton* playBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  
              DACircularProgressView* progress1;
  
              [bg setTag:-705];
  
              [chatImg setTag:-704];
  
              [playBtn addTarget:self action:@selector(playVideo:) forControlEvents:UIControlEventTouchUpInside];
  
              UIImage *bubble;
  
              CGRect bgRect;
  
              if([[[[NSUserDefaults standardUserDefaults] objectForKey:@"logindata"] objectForKey:@"id"] isEqualToString:[[chatArray objectAtIndex:indexPath.row]objectForKey:@"user_id"]]==YES)
              {
                  [bg setFrame:CGRectMake(112, 12, 200, 106)];
  
                  [chatImg setFrame:CGRectMake(124, 21, 172, 86)];
  
                  [playBtn setFrame:CGRectMake(149.0, 25, 119.0, 74.0)];
  
                  bubble = [[UIImage imageNamed:@"recieverImg.png"] stretchableImageWithLeftCapWidth:24 topCapHeight:15];
  
                  bgRect = CGRectMake(8.0, 11.0, 200, 106);
  
                  progress1= [[DACircularProgressView alloc] initWithFrame:CGRectMake(188.0f, 40.0f, 40.0f, 40.0f)];
              }
              else
              {
                  [bg setFrame:CGRectMake(8, 12, 200, 106)];
  
                  [chatImg setFrame:CGRectMake(25, 21, 172, 86)];
  
                  [playBtn setFrame:CGRectMake(54.0, 25, 119.0, 74.0)];
  
                  bubble = [[UIImage imageNamed:@"senderImg.png"] stretchableImageWithLeftCapWidth:24 topCapHeight:15];
  
                  bgRect = CGRectMake(108.0, 9.0, 200, 106);
  
                  progress1 = [[DACircularProgressView alloc] initWithFrame:CGRectMake(94.0f, 40.0f, 40.0f, 40.0f)];
              }
  
              //ProgressView
              [progress1 setTag:-707];
  
              progress1.roundedCorners = YES;
  
              if([dict objectForKey:[NSString stringWithFormat:@"download_%@",[[chatArray objectAtIndex:indexPath.row] objectForKey:@"audio_chat"]]]!=nil &amp;&amp; ![[dict objectForKey:[NSString stringWithFormat:@"download_%@",[[chatArray objectAtIndex:indexPath.row] objectForKey:@"audio_chat"]]] isKindOfClass:[NSNull class]] &amp;&amp; [[dict objectForKey:[NSString stringWithFormat:@"download_%@",[[chatArray objectAtIndex:indexPath.row] objectForKey:@"audio_chat"]]] length]&gt;0)
              {
                  [progress1 setHidden:NO];
              }
              else
              {
                  [progress1 setHidden:YES];
              }
  
              ///////////////////////////
  
              bg.image = bubble;
  
              CALayer * l = [chatImg layer];
  
              [l setMasksToBounds:YES];
              [l setCornerRadius:5.0];
  
              // You can even add a border
              [l setBorderWidth:4.0];
  
              [l setBorderColor:[[UIColor darkGrayColor] CGColor]];
  
              NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
  
              NSString *documentsDirectory = [paths objectAtIndex:0];
  
              NSString *filePath = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@",[[chatArray objectAtIndex:indexPath.row]objectForKey:@"audio_chat"]]];
  
              if ([appDel isFilePresent:filePath])
              {
                  // Use to show the video is downloaded
                  [playBtn setImage:[UIImage imageNamed:@"pause.png"] forState:UIControlStateSelected];
  
                  UIImage *thumbnail = [self thumbnailFromVideoAtURL:[NSURL fileURLWithPath:filePath]];
  
                  chatImg.image=thumbnail;// whichever imageview you want give this image
  
                  [playBtn setSelected:YES];
              }
              else
              {
                  chatImg.image =UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad?[UIImage imageNamed:@"Big.png"]:[UIImage imageNamed:@"small.png"];
                  // Use this to show download image
                  [playBtn setImage:[UIImage imageNamed:@"download.png"] forState:UIControlStateNormal];
  
                  [playBtn setSelected:NO];
              }
  
  
              [cell.contentView addSubview:bg];
              [cell.contentView addSubview:chatImg];
              [cell.contentView addSubview:playBtn];
  
              [cell.contentView addSubview:progress1];
  
          }
  
  ---------
  -(IBAction)playVideo:(id)sender
  {
   if (!isPresent)
      {
          isuploading = YES;
  
          if (isdownloading)
          {
              isdownloading=NO;
  
              DACircularProgressView* progrees1 = (DACircularProgressView *)[cell viewWithTag:-707];
  
              [progrees1 setHidden:NO];
  
              progrees1.trackTintColor = [UIColor colorWithRed:200.0/255.0 green:200.0/255.0 blue:200.0/255.0 alpha:1.0];
  
              progrees1.progressTintColor = [UIColor blackColor];
  
              [dict setObject:[NSString stringWithFormat:@"yes"] forKey:[NSString stringWithFormat:@"download_%@",[[chatArray objectAtIndex:clickedButtonIndexPath.row] objectForKey:@"audio_chat"]]];
  
              [appDel startDownloadFile:[[chatArray objectAtIndex:clickedButtonIndexPath.row] objectForKey:@"audio_chat"] inPath:filePath withRefrence:self];
  
          }
          else
          {
              [appDel showToastWithText:@"Error!!" detailText:@"Downloading is in progress..." viewController:self];
          }
      }
  }
  </code></pre>