我正在尝试使用 custom TableView cell
创建一个 TableView
并为 Image
创建一个 multiple XIB
,其他用于 Text + Video
。但是必须在界面中为 XIB 预定义高度。
那么如何为我的具有动态高度
的 UITableViewCell 提供 XIB?
最佳答案
在你的 viewDidLoad
中试试这个:
yourTableView.estimatedRowHeight = yourTableViewCellHeight
yourTableView.rowHeight = UITableViewAutomaticDimension
关于ios - 我们可以为具有动态高度的 UITableViewCell 使用 XIB 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41937833/