i have an customized cell that is loaded in table view cell and each cell have button with tag value. I need to call the IBAction method at each indexpath.row. For example if first row have that button than call should be made from first row to that action. Actualy i want to copy some text from each row when button is clicked and post it to Facebook.
here is my code:
- (UITableViewCell *)tableView:(UITableView *)tableView
cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"cell1";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
[[NSBundle mainBundle] loadNibNamed:@"audioviewcell" owner:self options:NULL];
cell = nibloadedcell;
}
fbbutton = (UIButton*) [cell viewWithTag:7];
if(fbbutton)
{
[self facebookclick:(id)];
}
return cell;
}
-(IBAction)facebookclick:(id)sender
{
}
i am unable to configure this.
see if this helps,