public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { // var vehicleCell = tableView.DequeueReusableCell(identifier: VehicleCell.Key) as VehicleCell; VehicleCell vehicleCell = tableView.DequeueReusableCell("VehicleCell", indexPath) as VehicleCell; vehicleCell.SetData(vehicles[indexPath.Row]); return(vehicleCell); }
protected override UITableViewCell GetOrCreateCellFor(UITableView tableView, NSIndexPath indexPath, object item) { var cell = tableView.DequeueReusableCell(VehicleCell.Key) as VehicleCell; if (cell == null) { cell = VehicleCell.Create(); } cell.ViewModel = item as VehicleItemViewModel; cell.trailingConstraint.Constant = cell.ViewModel.IsEditMode ? 90f : 8f; return(cell); }