I want to make height of a custom tableview cell to zero, which was created with autolayout. Basically I have container view added as subview to cell.contentview. Container view's top, bottom, left and right are pinned to content view's top, bottom, left and right. Under certain condition I want to make height as 0.
I iterated through content views's constraints and found this constrain causing the problem.
NSLayoutConstraint:0x1369d8670 UITableViewCellContentView:0x1369b1a90.height == 48
This constraint is added by default by tableview.
Things I Tried : I removed all subviews of container view. But this does not make cell height to zero.
Things I don't want to do:
- I dont want to reload entire tableview coz I will be having many rows with many subviews.
- I don't want to delete row
How can I set height to zero?