Ich habe eine Frage zum Tableview cell Button.Ich füge im Getcell methode ein Button.Wenn ich mein Button klicke möchte ich wissen in welche Zelle mein Button sich befindet.Weiss villeicht jemand wie ich das mache??
Danke im Voraus!
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
{
var cell =tableView.DequeueReusableCell(cellIdentifier);
cell.TextLabel.Text = tableItems[indexPath.Row].Ip;
editButton = UIButton.FromType(UIButtonType.RoundedRect);
editButton.Frame = new RectangleF(200, 10, 150, 40);
editButton.SetTitle("EDIT", UIControlState.Normal);
editButton.Font = UIFont.FromName("Helvetica-Bold", 15f);
cell.AddSubview(editButton);
editButton.TouchUpInside += (sender, e) => {
ipcontroller.PerformSegue("addipsegue", this);
};
if (tableItems[indexPath.Row].Save)//switch on
{ cell.Accessory = UITableViewCellAccessory.Checkmark; }
else
{ cell.Accessory = UITableViewCellAccessory.None; }
return cell;
}