0

I would like to programmatically change my tableViewCell's Height, How can i do so?

My TableView Example:-

enter image description here

pkc456
  • 8,350
  • 38
  • 53
  • 109
  • Possible duplicate of [Custom Cell Row Height setting in storyboard is not responding](http://stackoverflow.com/questions/8615862/custom-cell-row-height-setting-in-storyboard-is-not-responding) – mfaani Nov 13 '16 at 20:52

1 Answers1

4

In your viewcontroller set the row height via:

tableView.rowHeight = 88.8

You can also set the row height of an individual row by implementing:

func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
    if indexPath.row == 0 {
        return 88.0
    }
    return 44.0
}
Devran Cosmo Uenal
  • 6,055
  • 2
  • 26
  • 29