我在我的项目中使用带有自动布局的 Storyboard(XCode 6.3),使用尺寸类 Wcompact hRegular。我无法根据内容动态设置 UITableView Header 的高度。
最佳答案
当您更改其内容时,您可以使用此标题重新加载部分
像这样的东西:
- (void) shouldUpdateSections:(NSIndexSet *)sections
{
[self.view.tableView reloadSections:sections withRowAnimation:UITableViewRowAnimationAutomatic];
}
当您需要更新 header 时调用此方法。
为了提高性能,您可以只为此标题创建单独的部分。
关于ios - 如何根据ios 8中的内容动态调整UITableview Header高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31019938/