原因:tableview的风格选择问题。 选择UITableViewGroup 就会出现这个问题。 切换成plain 即可。如果,你需要使用group的风格。可使用如下方法
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
return 0.01;
}
如果这个还不行,尝试
试一下这个self.automaticallyAdjustsScrollViewInsets = NO;
或者尝试这个方法
self.edgesForExtendedLayout = UIRectEdgeNone;