public CircledTextiOSCell(NSString cellId, CircledTextCell nativeCell) : base(UITableViewCellStyle.Default, cellId) { NativeCell = nativeCell; SelectionStyle = UITableViewCellSelectionStyle.Gray; CircledTextLabel = new UILabel() { BackgroundColor = UIColor.Clear, TextColor = UIColor.Black, }; CircledTextLabel.ClipsToBounds = true; CircledTextLabel.TextAlignment = UITextAlignment.Center; HeadingLabel = new UILabel() { BackgroundColor = UIColor.Clear, TextColor = UIColor.Black, }; DetailLabel = new UILabel() { BackgroundColor = UIColor.Clear, TextColor = UIColor.Black, }; ContentView.Add(CircledTextLabel); ContentView.Add(HeadingLabel); ContentView.Add(DetailLabel); }
internal void UpdateCell(CircledTextCell nativeCell) { CircledTextLabel.Layer.CornerRadius = 16; CircledTextLabel.Text = nativeCell.CircledText; CircledTextLabel.TextColor = nativeCell.CircledTextColour.ToUIColor(); CircledTextLabel.BackgroundColor = nativeCell.CircleBackgroundColour.ToUIColor(); HeadingLabel.Text = nativeCell.Text; HeadingLabel.TextColor = nativeCell.TextColour.ToUIColor(); }