Reputation: 57
I have used UITableViewAutomaticDimension but I want the tableview not to show the space where the label is hidden.
Upvotes: 1
Views: 162
Reputation: 27448
If you are using UITableViewAutomaticDimension
then you should make height of label 0
instead of hiding it so it will automatically change cell's height.
Now for make label's height 0
when you are using autolayout
, you need to set outlet
of your height constraint of your label.
Then set constant
of that heightConstraintOutlet
to zero
instead of hiding and set it with desired value instead of showing
it!!
Upvotes: 1