Exemplo n.º 1
0
            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);
            }
Exemplo n.º 2
0
            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;
                }
            }