1

Navigation not been performed when using custom UITableViewCell Style on Selected Row Click:

Customcell = tableView.DequeueReusableCell(cellIdentifier) as Customcell 

if (cell == null)
    cell = new Customcell (cellIdentifier);

cell.UpdateCell(hotDogs[indexPath.Row].Name,
    hotDogs[indexPath.Row].Price.ToString(),
    UIImage.FromFile("Images/image1));

return cell;

But I am able to perform navigation when using UITableViewCell Default Style:

UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier) as UITableViewCell;

if (cell == null)
{
    cell = new UITableViewCell(UITableViewCellStyle.Default, cellIdentifier);
}

Row Selection Event Does not Even Trigger PrepareForSegueMethod when using custom UITableViewCell:

public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
{
    base.PrepareForSegue (segue, sender);
}
krlzlx
  • 5,752
  • 14
  • 47
  • 55
Ronak Shetiya
  • 960
  • 6
  • 27

1 Answers1

0

Row Selection Event Does not Even Trigger PrepareForSegueMethod when using custom UITableViewCell

There are a lot of similar case like yours online.

Refer to issue1,issue2,issue3.

The best workaround: Remove the "selection segue" and create a push segue in didSelectRowAtIndexPath programmatically.

override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
    this.PerformSegue("segueId", this);
}

Then this will trigger PrepareForSegue method.

ColeX
  • 14,062
  • 5
  • 43
  • 240