Question: There are a lot of posts asking how to make table view cells height dynamic and I understand that I could do it through `HeightForRowAtIndexPath`.

My questions is whether this is good practice or not.

It seems like an unscalable solution to check for a device and hard code a height just to be able to take up more room on lets say an iPhone 6 plus.

Is this good practice, should it be done at all, or is there a better way?
`

Answer: 
You can possibly set a height for your `TableView` multiplied with a suitable fraction. Say you design the cell for iPhone 6 Plus with dimensions of 1242 × 2208 pixels(414 × 736 points). Now you can infer a heightRatio w.r.t your current running device like

```
let heightRatio = UIScreen.mainScreen().bounds.height / 736

```

So in `heightForRowAtIndexPath` you may return the height as

```
return yourInterfaceBuilderCellHeight * heightRatio

```
If your data is changing dynamically and you need to set tableview cell height depends on that data height then **Apple** gives solution for this.

Just set both tableview property as below example.

```
_tableViewOne.estimatedRowHeight = 50; //minimum row height
_tableViewOne.rowHeight = UITableViewAutomaticDimension;

```

so it will take row **height according** to it's content.

> 
> Don't use tableview's heightForRowAtIndexPath method otherwise above
>  code will not work (it will override those properties).
> 
> 
> 

You don't need to do anything else for height. System will handle it.