<分区>
我有带有原型(prototype)单元格的表格 View , 在单元格中,我有 imageview 和下面的一些文本。 文本标签在原型(prototype)单元格中是一行,但有时它不止一行,我在服务器调用后将数据加载到 TableView 中。 Storyboard 中的标签 Lines 设置为 0,Line Break 设置为 Word Wrap。 我也试过http://candycode.io/automatically-resizing-uitableviewcells-with-dynamic-text-height-using-auto-layout/
但没有效果。 如果我使用 Using Auto Layout in UITableView for dynamic cell layouts & variable row heights 一切正常,因为标签文本是预定义的,但我从服务器加载数据并在 API 调用后重新加载 tableView,然后标签只是一行。