1
votes

I'm using a UITableViewController embedded in a navigation controller, I've checked the "hide bars on swipe" for the navigation controller in the storyboard. No crazy code, scrollview functions are not overridden, didn't write any code that would offset any views.

When I scroll up the tableview a tiny bit and release it when the navigation bar is half hidden, the whole table gets offset and it's off screen (sometimes the top left corner of the table is visible), then if I scroll up the table view a bit, it's back to its normal position, if I check "adjust scroll view insets" in the storyboard, the whole screen flashes black.

Has anyone encountered the same problem? p.s. I'm using Xcode 9 beta with iOS 10.3, not sure if this has anything to do with it.

EDIT:

Scroll navigation bar half way

enter image description here

The view after releasing

enter image description here

1
Can I see the output Result ?iOS Geek
see edit @iOSGeekjc127
you are using search bar here is it Embedded in different view . you had used hide bar yes it is working I think issue is occurring due to using Searchbar here on tableViewCOntroller Your bar sis getting hidden but not that search bar as see it s not going above status bar can you upload your code so I can have look in itiOS Geek
I removed all items from the navigation bar and it's still not working, the reason that navigation bar is not going above status bar is I set the status bar background color to be the same as the navigation bar, so when the navigation bar is hidden the status bar can have a background @iOSGeekjc127
can I please have a look on your code I want to see all your constraints you had provided or send me storyboard and TableViewController file if not full projectiOS Geek

1 Answers

1
votes

So I created a new set of TableviewController and NavigationController, and tested it step by step by adding changes to it, it turned out that I had set my navigation bar to be translucent in the storyboard, once I unchecked it the issue was resolved. There's still an unwanted bounce effect if I release the navigation bar at half hidden position, which appears to be the view adjusting the offset, but it's way better than what it was like.

P.S. make sure "Adjust scroll view insets" is checked.

EDIT:

Turns out setting extendedLayoutIncludesOpaqueBars to True also resolves this issue, if you want to keep the navigation bar opaque.