在我的表格視圖中,我有多個標籤顯示成本產品。 這樣的,但是當我點擊量按鈕,我可以得到的數量值,但我不知道如何將多個與特定的細胞[數量按鈕被按下它]的costlabel。如何使用該特定標籤更改標籤值?
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];
任何一個可以請幫我
在quanityView方法我能得到哪些量按鈕被點擊
-(void)quantityView:(UIButton *)click
{
tagValue=click.tag;
}
在這裏,我獲得數量值
- (void)popoverListView:(DDialogList *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
countQuantity=[[quantityArray objectAtIndex:indexPath.row] integerValue];
[self.mTableView.tableView reloadData];
[qtyView dismiss];
}
你能給我單元格的索引路徑方法的行,所以我可以因爲我認爲你打開按鈕點擊選擇器? –
@JAYRAPARKA它不是一個選擇器,這也是tableview,但彈出的方法是使用... –
@JAYRAPARKA我編輯了我的代碼,請檢查.. –