Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS7 Content Offset by 20 pixels for non existent Status Bars

I have a strange behaviour with my UIViews as I'm migrating to iOS7. It seems that they are sent a message to shrink by 20 pixels. I have removed the status bar from all my XIB files and explicitly set it to hidden in the application delegate. My UINavigationController seem to be sent a message:

_computeAndApplyScrollContentInsetDeltaForViewController

which in turn sends messages to my scroll views

_adjustContentOffsetIfNecessary

which set their offset to -20 pixels... This should not really happen as there is no reason for that function to adjust anything by that amount.

Does anyone have an idea of how to fix this?

like image 426
Mike M Avatar asked Sep 12 '13 17:09

Mike M


1 Answers

I found the solution! Just set:

self.automaticallyAdjustsScrollViewInsets = NO;

on the view controller that has the scroll view as a view...

like image 58
Mike M Avatar answered Oct 05 '22 05:10

Mike M