I have a UITableViewCell. Inside of the cell I have UILabel and UIButton, when user clicks the button the text expands but cell doesn't. So I want the cell to increase it's height with the label.
I have tried this code but it giving me a crash (unexpectedly found nil)
tableView.reloadRows(at: [IndexPath(row: 0, section: 0)], with: .fade)
tried this one also, again crash
tableView.rowHeight = cellHeightNumber
So basically I want it to work like this
Before expanding:
After expanding: