3

In Interface Builder, when working with a UITableViewController's table footer view, to which I added a blank view, it seems impossible to add constraints directly to it.

When I select the footer view of the table, and then select a constraint, all of the constraints are greyed out. Is this a bug or (more likely) am I wrongly assuming that you can't constrain a table footer view, to a UIScrollView

----- edit -----

Also, I have tried adding this in code...

[self.tableView.tableFooterView setTranslatesAutoresizingMaskIntoConstraints:NO];

//      Setup constraints
//
NSDictionary *viewsDictionary = @{@"superView" : self.view, @"tableView" : self.tableView,  @"tableFooterView" : self.tableView.tableFooterView};

//          Footer
//
[self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:[tableFooterView]|"
                                                                                       options:0
                                                                                       metrics:nil
                                                                                         views:viewsDictionary]];

But i just get this in the output:

2012-10-10 16:29:04.606 myApp[632:c07] *** Assertion failure in -[UITableView layoutSublayersOfLayer:], /SourceCache/UIKit_Sim/UIKit-2372/UIView.m:5776
2012-10-10 16:29:04.608 myApp[632:c07] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Auto Layout still required after executing -layoutSubviews. UITableView's implementation of -layoutSubviews needs to call super.'
*** First throw call stack:
(0x199b012 0x17c0e7e 0x199ae78 0x1256f35 0x7589ef 0x17d46b0 0x622fc0 0x61733c 0x622eaf 0x7f78cd 0x7401a6 0x73ecbf 0x73ebd9 0x73de34 0x73dc6e 0x73ea29 0x741922 0x7ebfec 0x738bc4 0x738dbf 0x738f55 0x741f67 0x705fcc 0x706fab 0x718315 0x71924b 0x70acf8 0x27e8df9 0x27e8ad0 0x1910bf5 0x1910962 0x1941bb6 0x1940f44 0x1940e1b 0x7067da 0x70865c 0x6d4d 0x2615)
libc++abi.dylib: terminate called throwing an exception
Adam Carter
  • 4,741
  • 5
  • 42
  • 103

1 Answers1

0

I also got same error but in your case try to Temp Fix : Disabling the autoLayout in custom cell Xib, and then build

Community
  • 1
  • 1
HDdeveloper
  • 4,396
  • 6
  • 40
  • 65