【问题标题】:table cell not auto resizing according to uiimageview height表格单元格不会根据 uiimageview 高度自动调整大小
【发布时间】:2019-01-31 14:00:33
【问题描述】:

UIImageView 高度宽度设置为fillparent。并使用以下代码自动调整表格单元格的大小。

  DiscountTableView.Source = new DiscountsTVS(discounts);
  DiscountTableView.EstimatedRowHeight = 164;
  DiscountTableView.RowHeight = UITableView.AutomaticDimension;

但我得到以下输出

不知道我做错了什么。

【问题讨论】:

    标签: ios uitableview xamarin.ios uiimageview xcode-storyboard


    【解决方案1】:

    你可以在这里查看工作示例我希望这对你有用。Dynamic hieght of tableviewcell

    【讨论】:

      【解决方案2】:

      如果你使用了 UITableView.AutomaticDimension ,你需要在 xib 或者代码中添加约束

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-09-30
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-09-28
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多