public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender) { if (!string.IsNullOrEmpty(segue?.Identifier) && segue.Identifier == OpenDetailsSegueIndentifier) { if (segue.DestinationViewController is DetailsViewController controller) { controller.DispatchItem = selectedItem; selectedItem = null; } } }
public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { selectedItem = items[indexPath.Row]; PerformSegue(OpenDetailsSegueIndentifier, this); }