美文网首页
iOS UITableView headView不自动上去

iOS UITableView headView不自动上去

作者: junhui | 来源:发表于2017-01-03 16:17 被阅读0次

self.monthView = [UIView alloc]init];

self.tableView.tableHeaderView = self.monthView;

使用这种方式去设置headView的时候 会出现headView.frame 改变

但是UItableViewCell 不自动上去的问题  这种问题出现iOS10一下

解决办法:

在你self.monthView.frame 修改以后 需要给self.tableView.tableHeaderView 重新赋值

也就是 这句话self.tableView.tableHeaderView = self.monthView;

需要重新写一遍

相关文章

网友评论

      本文标题:iOS UITableView headView不自动上去

      本文链接:https://www.haomeiwen.com/subject/uuwvvttx.html