public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell(SampleTableViewCell.Key) as SampleTableViewCell; if (cell == null) { cell = new SampleTableViewCell(); } // Configure the cell... nuint row = (nuint)indexPath.Row; NSString sampleName = sampleArray.GetItem <NSString> (row); cell.TextLabel.Text = sampleName; sampleDict = sampleDictArray.GetItem <NSDictionary>(row); if (sampleDict.ValueForKey(new NSString("SampleName")).ToString() == sampleName) { if (sampleDict.ValueForKey(new NSString("IsNew")).ToString() == "YES") { cell.DetailTextLabel.Text = "NEW"; cell.DetailTextLabel.TextColor = UIColor.FromRGB(148, 75, 157); } else if (sampleDict.ValueForKey(new NSString("IsUpdated")).ToString() == "YES") { cell.DetailTextLabel.Text = "UPDATED"; cell.DetailTextLabel.TextColor = UIColor.FromRGB(148, 75, 157); } else { cell.DetailTextLabel.Text = null; } } cell.Accessory = UITableViewCellAccessory.None; return(cell); }
public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath) { var cell = tableView.DequeueReusableCell (SampleTableViewCell.Key) as SampleTableViewCell; if (cell == null) cell = new SampleTableViewCell (); // Configure the cell... nuint row = (nuint)indexPath.Row; NSString sampleName = sampleArray.GetItem<NSString> (row); cell.TextLabel.Text = sampleName; sampleDict = sampleDictArray.GetItem<NSDictionary>(row); if (sampleDict.ValueForKey (new NSString ("SampleName")).ToString () == sampleName) { if (sampleDict.ValueForKey (new NSString ("IsNew")).ToString () == "YES") { cell.DetailTextLabel.Text = "NEW"; cell.DetailTextLabel.TextColor = UIColor.FromRGB (148, 75, 157); } else if (sampleDict.ValueForKey (new NSString ("IsUpdated")).ToString () == "YES") { cell.DetailTextLabel.Text = "UPDATED"; cell.DetailTextLabel.TextColor = UIColor.FromRGB (148, 75, 157); } else { cell.DetailTextLabel.Text = null; } } cell.Accessory = UITableViewCellAccessory.None; return cell; }