I have a UISearchBarDisplayController, a text field, and a button in the header view of the tableView. I've tried putting...
self.searchBar.translatesAutoresizingMaskIntoConstraints = YES;
in the viewDidLoad. I've tried putting constraints, but it always crashes when I dismiss the displayController, either by hitting the cancel button or click on the background. I get the error...
2014-02-05 22:49:16.774 XXXX[3818:60b] *** Assertion failure in -[UITableView layoutSublayersOfLayer:], /SourceCache/UIKit/UIKit-2903.23/UIView.m:8540
2014-02-05 22:49:16.777 XXXX[3818:60b] *** 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:
(0x2fd76e83 0x3a0d36c7 0x2fd76d55 0x3071f0af 0x324fb413 0x32181943 0x3217d167 0x32510231 0x32732d2f 0x327326b7 0x32532ab7 0x325329cf 0x32188413 0x3a5b80af 0x3a5ba9a9 0x2fd415b1 0x2fd3fe7d 0x2fcaa471 0x2fcaa253 0x349e42eb 0x3255f845 0x3b0bd 0x3a5ccab7)
libc++abi.dylib: terminating with uncaught exception of type NSException