Reputation: 31
I'm trying to create a TableView
with custom TableView cell
with multiple XIB
one for Image
, other for Text + Video
. But the height has to be predefined for the XIB in the interface.
So how can I have an XIB for my UITableViewCell with dynamic height
?
Upvotes: 1
Views: 714
Reputation: 130
Try this in your viewDidLoad
:
yourTableView.estimatedRowHeight = yourTableViewCellHeight
yourTableView.rowHeight = UITableViewAutomaticDimension
Upvotes: 3