我在我的項目中使用了具有自動佈局的Storyboard(XCode 6.3),控件大小爲Wcompact hRegular。我無法根據內容動態設置UITableView頁眉高度。如何根據ios 8中的內容動態調整UITableview頁眉高度
- (void) shouldUpdateSections:(NSIndexSet *)sections
{
[self.view.tableView reloadSections:sections withRowAnimation:UITableViewRowAnimationAutomatic];
}
呼叫,當你需要更新你的頭這種方法:
此鏈接可能會幫助你http://stackoverflow.com/questions/18118021/how-to-resize-superview-to-fit-all-subviews-with-autolayout/18155803#18155803 – Leo