I am building the chat app in which I am using the automatic dimensions of table view for cells but height for cell is not working properly for some cells.
You need to set contentcompressionresistance(vertical) to 1000 and contenthuggingpriority (vertical) to 1000