Check out example codes for "uitableviewcell automatic height". It will help you in understanding the concepts better.

Code Example 1

self.tableView.rowHeight = UITableViewAutomaticDimension;
self.tableView.estimatedRowHeight = 44.0; // set to whatever your "average" cell height is

Learn ReactJs, React Native from akashmittal.com