Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 that when I load the content for the first time the table appears to be ok (first image), but when I scroll down a space appears between top and first cell (second image):

enter image description hereenter image description here

With style plain this behavior does't occur but unfortunately I need to use the grouped table view style.

Any ideas about?

like image 888
Fry Avatar asked Oct 01 '13 08:10

Fry


1 Answers

Just add this in you ViewDidLoad method

self.automaticallyAdjustsScrollViewInsets = NO; 
like image 162
Slavcho Avatar answered Sep 23 '22 03:09

Slavcho