I want to use an UISearchDisplayController
on UIViewController
, that includes an UITableView
.
I use Autolayout. When i try to put the SearchBar (_searchBar) in the tableHeaderView with
self.tableView.tableHeaderView = _searchBar;
I get the error
'NSInternalInconsistencyException
', reason: 'Auto Layout still required after executing -layoutSubviews. UITableView's implementation of -layoutSubviews needs to call super.'
Disabling Autolayout, the error disappears, but i need Autolayout...
The error appears, when I use Custom Cells or StandardCells...
The error appears, when the TableView has no rows...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…