0

In my table view i have multiple label its shows cost product. enter image description herelike this but when i click the quantity button i can get the quantity values ,but i don't know how to multiple the costlabel with particular cell[which quantity button is pressed].

This is my code: enter image description here

 cell.lblCostPrice.tag=indexPath.row;
    cell.btnQuantity.tag=indexPath.row;

        [cell.btnQuantity addTarget:self action:@selector(quantityView:) forControlEvents:UIControlEventTouchUpInside];
currnentValues=[NSString stringWithFormat:@"%lu",[[arrGetProduct objectAtIndex:tagValue] integerValue]];
    cell.lblCostPrice.text=[NSString stringWithFormat:@"%@%@",[[arrGetProduct objectAtIndex:indexPath.row] valueForKey:@"price"],amount];

can any one please help me

In quanityView method i can get which quantity button is clicked

     -(void)quantityView:(UIButton *)click
        {
            tagValue=click.tag;

        }

Here i am getting Quantity Values

- (void)popoverListView:(DDialogList *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{


    countQuantity=[[quantityArray objectAtIndex:indexPath.row] integerValue];
    [self.mTableView.tableView reloadData];
    [qtyView dismiss];
}
Kishore Kumar
  • 4,265
  • 3
  • 26
  • 47

1 Answers1

0

viewwithTag is a method on UIView not on UIViewController. You'll probably have to call it like this:

UILabel *label = (UILabel *)[self.view viewWithTag:71];
Akash Raghani
  • 557
  • 1
  • 9
  • 21