Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extra top white space since IOS 8 using autolayout and scrollview

Since the new update to IOS8, i have an extra white space over my contentview in my scrollview. My content view should be centered in my scrollview and it's work fine on IOS7.

Here is the result :

enter image description here

Here is the storyboard version which doesn't have white space :

enter image description here

I'm wondering what could cause this extra space, is there anything new in ios8 that will cause my content view to have extra space ?

Maybe i need to change how i layout my view ?

Thanks!

EDIT: My solution was to only uncheck adjust scroll bar inset in my views which had the problem. However the solution below that i accepted works too.

like image 642
Pilouk Avatar asked Sep 25 '14 20:09

Pilouk


2 Answers

I faced the same issue in iOS 8, following is solution I found: - Select View Contoller (in storybord) in which you have added the scroll view - In "Property Inspector" in "Layout" section un-check "Adjust Scroll View Insets"

like image 64
Ali Awais Avatar answered Sep 20 '22 10:09

Ali Awais


Try this at your viewDidLoad for that scrollview:

self.automaticallyAdjustsScrollViewInsets = NO;
like image 25
theprojectabot Avatar answered Sep 20 '22 10:09

theprojectabot