Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
首先,我尝试使用自动布局 + 估计行高。但没有奏效。因此,我再次使用框架并在 heightForRowAtIndex 方法中计算高度并删除单元格上的所有自动布局,但此解决方案也无法正常工作。我的 Tableview 有以下条件。1.在我的表格视图中,我注册了 3 个自定义单元格 2.一个自定义标题表单 xib 3.单元格上的图像大小不同(太大或太小),所以我必须调整 100*100 区域的大小,左上对齐
我的这个链接对你有帮助https://www.raywenderlich.com/87975/dynamic-table-view-cell-height-ios-8-swift