iOS 7 UITableView: How to remove space between navigation bar and first cell

前端 未结 15 2360
Happy的楠姐
Happy的楠姐 2020-12-04 07:15

Description of the problem: with iOS 7 in grouped UITableView there is a gap between the top of the table view and the first cell.

The strange part is th

15条回答
  •  不思量自难忘°
    2020-12-04 07:45

    There was a space above the UITableView itself, and also between the cells. Found my solution in 2 different answers above..posting it again so that nobody misses both solutions.

    This removed the space from above :

    self.automaticallyAdjustsScrollViewInsets = NO;
    

    and this removed the spaces below the cells : Setting the 'Style' attribute of the UITableView to 'Plain'

提交回复
热议问题