Xamarin故事板与模拟器问题 - Tableviewcell autolayout和约束

时间:2016-05-17 20:10:13

标签: ios uitableview xamarin

我的故事板显示正确的布局,但是我在模拟器中收到了不同的结果。我无法确定问题。 代码和图片如下:

Image1

Image2

        xGrid.RowHeight = 99;
        xGrid.Source = new IATableSource(items, this);       
        xGrid.ReloadData();
        xGrid.LayoutIfNeeded();

 public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
    {
        ItemAddCell cell = (ItemAddCell)tableView.DequeueReusableCell(CellIdentifier, indexPath);
        Item item = TableItems[indexPath.Row];
        cell.UpdateCell(item.Title,item.Description);
        cell.LayoutIfNeeded();

        return cell;

    }

0 个答案:

没有答案