title: Display button click count in label for particular cell which are subviews to uitableview
body: <p>I have a button and a label which are sub views to UITableView.</p>
  
  <p>Initially label value is 0.</p>
  
  <p>what i need is, when i click button on particular cell i want to increment value in same cell label (as 1) and display that value in same label.</p>
  
  <p>And again i clicked same cell button  the label in that cell should be increment (as 2) and display that value in same cell in UITableView.</p>
  
  <p>My code..</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  
  {
  static NSString *CellIdentifier = @"Cell";
  
  UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  UILabel *Lbl;
  UIButton *btn;
  if (cell == nil) {
      cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
  
      Lbl =[[UILabel alloc]init];
      [Lbl setFrame:CGRectMake(56, 60, 117, 12)];
      [Lbl setBackgroundColor:[UIColor clearColor]];
      [Lbl setTextAlignment:NSTextAlignmentLeft];
      [Lbl setFont:[UIFont boldSystemFontOfSize:15.0]];
      Lbl.tag=indexPath.row;
      [cell.contentView addSubview:Lbl];
  
      btn =[UIButton buttonWithType:UIButtonTypeCustom];
      [btn setTitle:@"add" forState:UIControlStateNormal];
      [btn setTitleColor:[UIColor colorWithRed:0.7 green:0 blue:0 alpha:1.0] forState:UIControlStateNormal];
      [btn setTitleColor:[UIColor colorWithRed:0.7 green:0 blue:0 alpha:1.0] forState:UIControlStateHighlighted];
      [[btn titleLabel] setFont:[UIFont boldSystemFontOfSize:23]];
      [btn setFrame:CGRectMake(289, 2, 30, 71)];
      btn.tintColor=[UIColor lightGrayColor];
      btn.tag=indexPath.row;
      [btn addTarget:self action:@selector(increaseItemCount:) forControlEvents:UIControlEventTouchUpInside];
      [cell.contentView addSubview:btn];
  } else {
      Lbl =(UILabel *)[cell.contentView viewWithTag:indexPath.row];
      btn =(UIButton *)[cell.contentView viewWithTag:indexPath.row];
  }
  
  cell.textLabel.text=@"title";
  countLbl.text = [[NSString alloc] initWithFormat:@"%d",showItemCount];
  
  return cell;
  
  }
  
  // button action method
  -(void)increaseItemCount:(UIButton *)sender
  {    
  UITableViewCell *cell = (UITableViewCell *)sender.superview.superview;
  NSIndexPath *path = [tableView indexPathForCell:cell];
  NSLog(@"row: %d",path.row);
  UILabel *countLbl =(UILabel *)[cell.contentView viewWithTag:path.row];
  showItemCount=[countLbl.text intValue] + 1;
  NSLog(@"%d",showItemCount);
  countLbl.text = [[NSString alloc] initWithFormat:@"%d",showItemCount];
  
  }
  </code></pre>
  
  <p>I tried this, After clicking the value is showing in other cells and when i scroll the table view that value is showing in all cells.</p>
  
  <p>Any suggestions or code</p>