美文网首页
UITableViewCell Self-Sizing

UITableViewCell Self-Sizing

作者: ShinrenPan | 来源:发表于2015-11-30 13:51 被阅读155次

UITableViewCell Self-Sizing 步驟如下:

  • 步驟1: 設置 UITableView estimatedRowHeight 跟 rowHeight.
self.tableView.estimatedRowHeight = 44.0;
self.tableView.rowHeight = UITableViewAutomaticDimension;
  • 步驟2: Override UITableViewCell sizeThatFits, 或是使用 autoLayout.

相关文章

网友评论

      本文标题:UITableViewCell Self-Sizing

      本文链接:https://www.haomeiwen.com/subject/gorjhttx.html