-1

Any thoughts? Kind of weird, I've never see this before.

enter image description here enter image description here

Ryan Detzel
  • 5,519
  • 9
  • 37
  • 49

3 Answers3

2

How is the row height set? Assuming you have auto layout configured for your custom table view cells correctly.You might consider setting the following properties.

   self.tableView.estimatedRowHeight = 50;
   self.tableView.estimatedSectionHeaderHeight = 50;
   self.tableView.rowHeight = UITableViewAutomaticDimension;

Hard to determine what might be wrong with the info provided in the question, but hope this helped.

rajagp
  • 1,443
  • 8
  • 10
1

for -(float)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{

replace with

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{

replace float with CGFloat , it worked for me...

  • Can you explain why this worked? Just supplying code rarely answers a question as the asker doesn't necessarily know what the code means. – SuperBiasedMan May 21 '15 at 11:50
  • http://stackoverflow.com/questions/1264924/whats-the-difference-between-using-cgfloat-and-float This would help. After updating the XCode to 8.3 this happened. – Rajath Kornaya Aug 06 '15 at 11:51
  • thank you for this answer! This was exactly the issue, everything seemed fine on iOS 8.4, 8.3 and 7.1, but an iPad with 8.1 had all the tableviewcells stacked. – Jh2170 Sep 08 '15 at 21:09
0

I had to add a height constraint on the uiviewcell but it's still odd it worked fine in 7.1 and 8.3. Thanks.

Ryan Detzel
  • 5,519
  • 9
  • 37
  • 49