void ReleaseDesignerOutlets() { if (AdditionalValueCell != null) { AdditionalValueCell.Dispose(); AdditionalValueCell = null; } if (CommentCell != null) { CommentCell.Dispose(); CommentCell = null; } if (IconCell != null) { IconCell.Dispose(); IconCell = null; } if (MainValueCell != null) { MainValueCell.Dispose(); MainValueCell = null; } if (NameCell != null) { NameCell.Dispose(); NameCell = null; } }
// Use this for initialization void Start() { cellList = new List <CommentCell>(); for (int i = 0; i < cell_num; i++) { GameObject cellObj = Instantiate(commentCellPrefab, this.transform); CommentCell cell = cellObj.GetComponent <CommentCell>(); cellList.Add(cell); } }
private void SetCommentCellText(IComment comment, CommentCell commentCell) { if (!string.IsNullOrWhiteSpace(comment.Text)) { var text = GetText(comment.Id, comment.Text); commentCell.Text.AttributedText = text; var textSize = commentCell.Text.SizeThatFits(new CGSize(commentCell.Text.Frame.Width, double.MaxValue)); _textHeights[comment.Id] = textSize.Height; } }
void ReleaseDesignerOutlets() { if (CommentCell != null) { CommentCell.Dispose(); CommentCell = null; } if (IconCell != null) { IconCell.Dispose(); IconCell = null; } if (PeriodCell != null) { PeriodCell.Dispose(); PeriodCell = null; } if (PeriodIconCell != null) { PeriodIconCell.Dispose(); PeriodIconCell = null; } if (TimeCell != null) { TimeCell.Dispose(); TimeCell = null; } if (UserCell != null) { UserCell.Dispose(); UserCell = null; } }