TLYShyNavBar icon indicating copy to clipboard operation
TLYShyNavBar copied to clipboard

iOS 11 Large gap above scroll view

Open joshbernfeld opened this issue 7 years ago • 6 comments

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;
}

joshbernfeld avatar Oct 08 '17 06:10 joshbernfeld

Were you able to work around it?

StainlessStlRat avatar Oct 09 '17 22:10 StainlessStlRat

Facing same issue

n4nachiket avatar Oct 18 '17 07:10 n4nachiket

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

joshbernfeld avatar Oct 18 '17 08:10 joshbernfeld

@joshbernfeld Great!. It is helpful to me!

stevekim0417 avatar Oct 21 '17 00:10 stevekim0417

you can also use:

[[self shyNavBarManager] setHasCustomRefreshControl:YES];

StefaniOSApps avatar Oct 31 '17 22:10 StefaniOSApps

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.

StainlessStlRat avatar Nov 19 '17 22:11 StainlessStlRat