public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { CustomizeTagTableViewCell cell = tableView.DequeueReusableCell(CustomizeTagTableViewCell.Key) as CustomizeTagTableViewCell; if (cell == null) { cell = CustomizeTagTableViewCell.Create(); } cell.SelectionStyle = UITableViewCellSelectionStyle.None; if (indexPath.Row == 0) { cell.TagNameLabel.Text = "All Tags"; cell.ContentView.AddSubview(new AllTagView(12, 10, 16)); bool isAllSelected = isNoTagSelected; if (isAllSelected) { foreach (var tag in tagList) { if (!tag.IsSelected) { isAllSelected = false; break; } } } cell.Accessory = isAllSelected ? UITableViewCellAccessory.Checkmark : UITableViewCellAccessory.None; } else if (indexPath.Row == 1) { cell.ContentView.Add(new DoubleCircleView(4, 5, UIColor.White, ColorUtil.ConvertFromHexColorCode("#808080"), 16, 17)); cell.TagNameLabel.Text = "No tag"; cell.Accessory = isNoTagSelected ? UITableViewCellAccessory.Checkmark : UITableViewCellAccessory.None; } else { Tag tag = tagList [indexPath.Row - 2]; cell.ContentView.Add(new DoubleCircleView(5, 6, ColorUtil.ConvertFromHexColorCode(tag.AnnoTag.Color), UIColor.White, 15, 16)); cell.TagNameLabel.Text = tag.AnnoTag.Title; cell.Accessory = tag.IsSelected? UITableViewCellAccessory.Checkmark : UITableViewCellAccessory.None; } return(cell); }
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { CustomizeTagTableViewCell cell = tableView.DequeueReusableCell(CustomizeTagTableViewCell.Key) as CustomizeTagTableViewCell; if (cell == null) { cell = CustomizeTagTableViewCell.Create(); } cell.SelectionStyle = UITableViewCellSelectionStyle.None; cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; Tag tag = TagList[indexPath.Row]; cell.annotationTagId = tag.AnnoTag; cell.ContentView.Add(new DoubleCircleView(5, 6, ColorUtil.ConvertFromHexColorCode(tag.AnnoTag.Color), UIColor.White, 15, 16)); cell.TagNameLabel.Text = tag.AnnoTag.Title; return(cell); }