I need a UITableView with cells like this:
I tried and ended up in this:
I used UITableViewAutomaticDimension with Autolayout (pinning the label to 4 sides of the superview and not giving a height constraint) and was able to give dynamic height to the cells. But what I also want is the width of the label to be adjusted according to the size of the text (see first image).
Any help would be highly appreciated. Thanks.