Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In iOS 7 the ScrollView avoids the status bar #49

Open
Megatron1000 opened this issue Sep 12, 2013 · 14 comments
Open

In iOS 7 the ScrollView avoids the status bar #49

Megatron1000 opened this issue Sep 12, 2013 · 14 comments

Comments

@Megatron1000
Copy link

If the view is set to take up the whole screen, now that the status bar in iOS 7 encroaches on the view area, the scrollview is unavoidably lowered by 20 pixels, clipping the bottom 20 pixels of the view.

@Wirsing84
Copy link

This is affecting me too :X

@Megatron1000
Copy link
Author

I've figured out how to fix it. In Interface Builder, under the attributes inspector, the viewcontroller has a property called 'adjust scroll view insets' you need to untick.

@Wirsing84
Copy link

Well that property (automaticallyAdjustScrollViewInsets) is quite important in iOS 7 - so this is not a viable solution

@Megatron1000 Megatron1000 reopened this Sep 30, 2013
@Megatron1000
Copy link
Author

Ok, well it worked in my case as I'm just setting it on a single view controller so doesn't have a knock on effect for anything else I'm doing. I thought the setting was just to assist with the transparent navigation bars though.

@thepelican
Copy link

didn't work for me

@xiaodoudou
Copy link

This is affecting me too... Any work around?
I try your solution @Megatron1000 but didn't work for me too.

@Jack-s
Copy link

Jack-s commented Oct 18, 2013

@xiaodoudou @xiaodoudou You can try unchecking the "Under Top Bars" option under "Extend Edges" (obviously this isn't ideal and I wouldn't consider that a "solution", but that should work for the moment).

@nessalauren5
Copy link

@Megatron1000's solution worked for me. Hoping to pull a more stable solution though..

@michaeltyson
Copy link
Owner

Could somebody create/adapt a sample project to demonstrate this? Then I'll take a look.

@christian-smith
Copy link

This is what I'm using in my viewController for anyone not using IB:

if ([self respondsToSelector:@selector(automaticallyAdjustsScrollViewInsets)]) {
self.automaticallyAdjustsScrollViewInsets = NO;
}

@pablolic
Copy link

TPKeyboardAvoiding was moving the scroll view down before the screen was presented to the user, it was showing a 1 cm white space horizontal strip between the navigation bar at the top of the screen and the top of the first text field. @Megatron1000's solution worked for me. Hoping to pull a more stable solution though.

@xiaodoudou
Copy link

Regarding this issue I solved it by changing "kCalculatedContentPadding" to 0.
I don't know if its a big issue, but regarding my app it's seems to working well.

@freemansion
Copy link

@xiaodoudou, thanks! I had same problem and changing kCalculatedContentPadding value to '0' resolves issue with offset by Y after hiding keyboard.

@patelnitesh
Copy link

static const CGFloat kCalculatedContentPadding = 0;
works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests