예제 #1
0
        public override float GetHeightForRow(UITableView tableView, NSIndexPath indexPath)
        {
            var cell = new CommentCellView(CellIdentifier);

            var item = indexPath.Row < _parentController.CommentItems.Count ? _parentController.CommentItems [indexPath.Row] : CommentItem.NullComment();

            cell.UpdateCell(item.Text, ParticipantItem.NullCustomer(), null);

            cell.SetNeedsUpdateConstraints();
            cell.UpdateConstraintsIfNeeded();

            cell.Bounds = new RectangleF(0, 0, _parentController.View.Bounds.Width, _parentController.View.Bounds.Height);

            cell.SetNeedsLayout();
            cell.LayoutIfNeeded();

            return(cell.ExpectedRowHeight < 60 ? 60 : cell.ExpectedRowHeight);
        }
예제 #2
0
파일: CommentCell.cs 프로젝트: 21Off/21Off
		// Create the UIViews that we will use here, layout happens in LayoutSubviews
		public CommentCell (UITableViewCellStyle style, NSString ident, UIComment comment, 
		                     Action<int> goToMembersPhotoAction)
			: base (style, ident)
		{
			SelectionStyle = UITableViewCellSelectionStyle.None;
			_Comment = comment;
			
			tweetView = new CommentCellView (comment, goToMembersPhotoAction);
			UpdateCell (comment);
			ContentView.Add (tweetView);
		}