【问题标题】:Dynamic resizing UITableViewCell动态调整 UITableViewCell 大小
【发布时间】:2015-11-02 08:15:29
【问题描述】:

我尝试调整 textLabel 中超过 1 行的 tableViewCells 的大小。我不知道为什么,但是如果出现一个新单元格,则该单元格将被调整大小。但是如果我重新启动应用程序,所有单元格都具有默认高度。我设置了cell.textLabel?.numberOfLines = 0self.tableView.rowHeight = UITableViewAutomaticDimension ,但它不起作用。我正在使用 iOS8 和 Xcode 6.3.2。

【问题讨论】:

    标签: ios swift uitableview ios8 height


    【解决方案1】:

    尝试设置估计高度: tableView.estimatedRowHeight = 44.0

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-24
      • 2012-11-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多