title: how to access the labels using tags in objective-c
body: <p>I am implementing an iphone application.Which is a UItableview.It has two sections.Three labels are added to all the cells in section-I.I have given tags 1,2,3 for those 3 labels when adding to the cells.Now I want to get the values from label3 from all the cells from section-I and I would like to add all the float values and display the total in another label which is in section-II.I read that I should give different tags for different cell's label3(label with tag-3).How is it possible please guide me.I have float values in the label3.I wanna add all the values and present the result in section-II.Please help me with some reference.</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
  {
  NSString* curItem = [self.finalItems objectAtIndex:indexPath.row];
  NSString* curQuantity = [self.finalPrices objectAtIndex:indexPath.row];
  NSString* priceStr = [self fetchDishRecordswithpredicate:curItem];
  NSMutableString* priceValStr = [NSMutableString stringWithString:priceStr];
  [priceValStr replaceCharactersInRange:NSMakeRange(0, 1) withString:@""];
  float totalPrice = [curQuantity floatValue]*[priceValStr floatValue];
  UILabel *lblTemp1 = (UILabel *)[cell viewWithTag:1];
  UILabel *lblTemp2 = (UILabel *)[cell viewWithTag:2];
  UILabel *lblTemp3 = (UILabel *)[cell viewWithTag:3];
  switch (indexPath.section) {
      case 0: {
      lblTemp1.text = curItem;
      lblTemp2.text = curQuantity;
      lblTemp3.text = [NSString stringWithFormat:@"$ %0.2f", price];
      } break;
      case 1: {
          lblTemp1.text = @"Your Total:";
          lblTemp3.text = @"How can I get Total here";
      } break;
   }
  return cell;
  }
  </code></pre>