public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { UITableViewCell cell = tableView.DequeueReusableCell("LbtCell", indexPath); LbtItem lbtItem = (LbtItem)currentViewContorller.lbtItemData[indexPath.Row]; if (lbtItem.MIsUsed) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } cell.TextLabel.Text = lbtItem.Frequency; return(cell); }
public override void RowDeselected(UITableView tableView, NSIndexPath indexPath) { UITableViewCell cell = tableView.CellAt(indexPath); LbtItem lbtItem = (LbtItem)currentViewContorller.lbtItemData[indexPath.Row]; if (cell.Accessory == UITableViewCellAccessory.Checkmark) { cell.Accessory = UITableViewCellAccessory.None; lbtItem.MIsUsed = false; } else { cell.Accessory = UITableViewCellAccessory.Checkmark; lbtItem.MIsUsed = true; } }