0

I am new in iOS and I am facing problem regarding to set constraint on custom tableview. I am using two label as in the image

enter image description here

But also after the constraint it is giving me gap

enter image description here

I found a solution but not able to understand and apply here.

//Assign Table View Hight...
closetableview.estimatedRowHeight = 80;//the estimatedRowHeight but if is more this autoincremented with autolayout
closetableview.rowHeight = UITableViewAutomaticDimension;
[closetableview setNeedsLayout];
[closetableview layoutIfNeeded];
closetableview.contentInset = UIEdgeInsetsMake(0, 0, 0, 0) ;

closetableview.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];

I have already write code like this in viewDidLoad.

halfer
  • 19,824
  • 17
  • 99
  • 186
Muju
  • 884
  • 20
  • 54

0 Answers0