I have an application that requires user comments to be displayed in a table cell. How to set dynamic cell height based on cell content like in Instagram?

Basically, I have texts and comments that have different lengths in different cells. Can someone advise me how can I implement a dynamic height method (like instagram)?
ios objective-c uitableview
Zhen
source share