iOS8中的UItableView顶部有留白

解决方法如下:

 

当cell的类型是plaint类型时,直接设置self.automaticallyAdjustsScrollViewInsets=NO;应该就可以的
当cell的类型是group类型时,此时要去掉tableView顶部的空白需要两步:
1.设置self.automaticallyAdjustsScrollViewInsets=NO
2.设置heightForHeaderInSection的高度为0.5
-(CGFloat)tableView:(UItableView *)tableView heightForHeaderInSection(NSInteger)section{
return 0.5;
}