IOS7 : UIScrollView offset in UINavigationController

OK so i found the solution, I have set in my controller the property:

self.automaticallyAdjustsScrollViewInsets = false

I don't really understand the true benefit of this property though, (or why the default value is true)

The only documentation i found was there:

  • https://web.archive.org/web/20160405135605/https://developer.apple.com/library/ios/documentation/userexperience/conceptual/TransitionGuide/AppearanceCustomization.html
  • https://developer.apple.com/documentation/uikit/uiviewcontroller/1621372-automaticallyadjustsscrollviewin

Update

In iOS 11 automaticallyAdjustsScrollViewInsets is deprecated

You should now use:

self.tableView.contentInsetAdjustmentBehavior = .never

I also encourage you to check this question and its answer to get a better understanding of those properties


@Justafinger's answer worked like a charm for me as well.

Just wanted to add that this setting can also be adjusted easily from the interface builder.

  1. Select your view controller
  2. Click the 'Attributes Inspector' tab
  3. Uncheck 'Adjust Scroll View Insets'
  4. Enjoy!

enter image description here