public void UpdateCell(LocationsViewLocationViewModel viewModel, NSIndexPath indexPath, NSString cellId) { TableViewCellId = cellId; var section = indexPath.Section; var row = indexPath.Row; if (TableViewCellId == LocationsCellId) { switch (section) { case (int)LocationsSection.current: mainLabel.Text = viewModel.MyLocationName(); secondaryLabel.Text = viewModel.MyLocationAsString(); break; case (int)LocationsSection.favorite: mainLabel.Text = viewModel.LocationName(row+1); secondaryLabel.Text = string.Empty; break; } } else { throw new Exception("unexpected Table View Cell ID"); } }
public void UpdateCell(LocationsViewLocationViewModel viewModel, NSIndexPath indexPath, NSString cellId) { TableViewCellId = cellId; var section = indexPath.Section; var row = indexPath.Row; if (TableViewCellId == AddLocationCellId) { mainLabel.Text = viewModel.LocationName(row); secondaryLabel.Text = ""; } else { throw new Exception("unexpected Table View Cell ID"); } }