I created header for tableview(!not for the section) in story board with auto layout.
I want to have ability to show/hide it.
How can I do it?
I tried this code:
self.tableView.tableHeaderView.hidden = !flag;
CGRect frame = self.tableView.tableHeaderView.frame;
frame.size.height = flag? k_HEIGHT_TableViewHeader : 0;
self.tableView.tableHeaderView.frame = frame;
It works , But it gives me a lot of auto layout errors.
Also I can set it to nil. If so, how can I load header from storyboard?