public override UITableViewCell GetCell(Cell item, UITableViewCell reusableCell, UITableView tv) { Performance.Start(out string reference); var viewCell = (ViewCell)item; var cell = reusableCell as ViewTableCell; if (cell == null) { cell = new ViewTableCell(item.GetType().FullName); } cell.ViewCell = viewCell; SetRealCell(item, cell); WireUpForceUpdateSizeRequested(item, cell, tv); UpdateBackground(cell, item); SetAccessibility(cell, item); Performance.Stop(reference); return(cell); }
public override UITableViewCell GetCell(Cell item, UITableViewCell reusableCell, UITableView tv) { var viewCell = (ViewCell)item; var cell = reusableCell as ViewTableCell; if (cell == null) { cell = new ViewTableCell(item.GetType().FullName); } else { cell.ViewCell.PropertyChanged -= ViewCellPropertyChanged; } viewCell.PropertyChanged += ViewCellPropertyChanged; cell.ViewCell = viewCell; SetRealCell(item, cell); WireUpForceUpdateSizeRequested(item, cell, tv); UpdateBackground(cell, item); UpdateIsEnabled(cell, viewCell); return(cell); }
public override UITableViewCell GetCell(Cell item, UITableViewCell reusableCell, UITableView tv) { var viewCell = (ViewCell)item; var cell = reusableCell as ViewTableCell; if (cell == null) cell = new ViewTableCell(item.GetType().FullName); else cell.ViewCell.PropertyChanged -= ViewCellPropertyChanged; viewCell.PropertyChanged += ViewCellPropertyChanged; cell.ViewCell = viewCell; SetRealCell(item, cell); WireUpForceUpdateSizeRequested(item, cell, tv); UpdateBackground(cell, item); UpdateIsEnabled(cell, viewCell); return cell; }
static void UpdateIsEnabled(ViewTableCell cell, ViewCell viewCell) { cell.UserInteractionEnabled = viewCell.IsEnabled; cell.TextLabel.Enabled = viewCell.IsEnabled; }