Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

iOS 11 Large gap above scroll view #190

Open
joshbernfeld opened this issue Oct 8, 2017 · 6 comments
Open

iOS 11 Large gap above scroll view #190

joshbernfeld opened this issue Oct 8, 2017 · 6 comments

Comments

@joshbernfeld
Copy link

joshbernfeld commented Oct 8, 2017

I was experiencing an issue on iOS 11 where there was a gap above the scroll view before the navigation bar. The solution for me was the following code. It seems that in addition to the content inset TLY was adding, iOS was then adding another inset which can be seen in the new variable adjustedContentInset

https://developer.apple.com/documentation/uikit/uiscrollview/2902259-adjustedcontentinset

This was my solution

if (@available(iOS 11.0, *)) {
    self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
@StainlessStlRat
Copy link

Were you able to work around it?

@n4nachiket
Copy link

Facing same issue

@joshbernfeld
Copy link
Author

If you place the above code into the view controller that has your table view it should fix it

@stevekim0417
Copy link

@joshbernfeld Great!. It is helpful to me!

@StefaniOSApps
Copy link

you can also use:

[[self shyNavBarManager] setHasCustomRefreshControl:YES];

@StainlessStlRat
Copy link

I still get weird behavior where there are gaps when a view is swapped back in in a custom tab bar implementation. Setting it to use has custom refresh control starts the table view underneath the bar.

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

No branches or pull requests

5 participants