nfloat CalculateHeightFor(ChatDetayDTO msg, UITableView tableView) { var Boll = msg.text.Split('#'); if (Boll.Length <= 1)//Resim { int index = -1; if (ME.id == msg.receiverId) //GelenMesaj { index = 0; } else { index = 1; } BubbleCell cell = sizingCells[index]; if (cell == null) { cell = sizingCells[index] = (BubbleCell)tableView.DequeueReusableCell(GetReuseId(msg)); } cell.Message = msg; cell.SetNeedsLayout(); cell.LayoutIfNeeded(); CGSize size = cell.ContentView.SystemLayoutSizeFittingSize(UIView.UILayoutFittingCompressedSize); return(NMath.Ceiling(size.Height) + 1); } else { return(NMath.Ceiling(200f) + 1); } }
nfloat CalculateHeightFor(Message msg, UITableView tableView) { var index = (int)msg.Type; BubbleCell cell = sizingCells[index]; if (cell == null) { cell = sizingCells[index] = (BubbleCell)tableView.DequeueReusableCell(GetReuseId(msg.Type)); } cell.Message = msg; cell.SetNeedsLayout(); cell.LayoutIfNeeded(); CGSize size = cell.ContentView.SystemLayoutSizeFittingSize(UIView.UILayoutFittingCompressedSize); return(NMath.Ceiling(size.Height) + 1); }