How to remove imageView from tableview's cell, and reset the cell's height

240 views Asked by At

I use auto layout and constraints in my custom cell, which include imageView,UILabel, and the UILabel can auto adjust the content height(I useUITableViewAutomaticDimension).

Now i want to remove cell'simageView in demo(i setimageView nil), i can do that, but i can't change the cell's height small.What should i do, thank you very much.

1

There are 1 answers

2
Pablo Martinez On

You can override the UITableView function

func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
    return 65.0
}