public override UITableViewCell GetCell(UITableView tv) { var cell = tv.DequeueReusableCell(ShowcaseTableViewCell.Key) as ShowcaseTableViewCell; if (cell == null) { cell = ShowcaseTableViewCell.Create(); } try { cell.Image = ImageLoader.DefaultRequestImage(new Uri(_imageUrl), this); } catch { cell.Image = null; } cell.Description = _description; cell.Name = _name; return(cell); }
public float GetHeight(MonoTouch.UIKit.UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath) { if (GetRootElement() == null) { return(44f); } var cell = GetRootElement().GetOffscreenCell(ShowcaseTableViewCell.Key, () => ShowcaseTableViewCell.Create()); cell.Description = _description; cell.Name = _name; cell.SetNeedsUpdateConstraints(); cell.UpdateConstraintsIfNeeded(); cell.Bounds = new RectangleF(0, 0, tableView.Bounds.Width, tableView.Bounds.Height); cell.SetNeedsLayout(); cell.LayoutIfNeeded(); return(cell.ContentView.SystemLayoutSizeFittingSize(UIView.UILayoutFittingCompressedSize).Height + 1); }