TLYShyNavBar icon indicating copy to clipboard operation
TLYShyNavBar copied to clipboard

TabBarController breaks bottom tableView constraint

Open acarella opened this issue 9 years ago • 5 comments

First: this is an awesome library, thanks so much for writing it.

I'm using a tabBar controller in my project, with a navigation controller in the second tab, and a UIViewController as the root of that navigation controller. I have a tableView that I'm setting as my shyNavBarManager scrollView.

I also have an extension view that I'm using.

When I scroll up, it appears that the bottom constraint that holds the tableView to the UIViewController view gets broken, although, Xcode doesn't generate any warnings about this, so perhaps this isn't the case. Anyway, what does happen is the bottom of the tableView appears to slide upwards with the scroll.

I'm including screenshots of the simulator, and Xcode's view debugger.

This happened in a project I'm working on and I was able to reproduce it by inserting a tabBar controller into the swift demo project, and connecting it to the navigation controller with a relationship segue.

The amount that the tableView slides up varies with each run of the app.

screen shot 2015-12-11 at 11 06 33 am screen shot 2015-12-11 at 11 07 10 am

acarella avatar Dec 11 '15 17:12 acarella

Thanks for reporting this, I am hoping to get around to the issues here over the next couple of weeks. Will review any PR ASAP as always, though.

Mazyod avatar Dec 14 '15 14:12 Mazyod

+1 I have the same issue :(

rwinzhang avatar Mar 07 '16 03:03 rwinzhang

I have the same issue. Has there been a fix or a workaround for this yet?

ivanlovrenovic avatar Mar 24 '16 22:03 ivanlovrenovic

Writing a comment about a possible fix/workaround for this issue. I haven't had the chance to test the solution perfectly so use the fix at your own risk. What I have tested is that the solution doesn't break anything else in the demo app and it is because of that reason I decided to comment the solution.

In the file "TLYShyScrollViewController.m", just after setting "insets.top = normalizedY;", allocate the insets bottom parameter aswell to 0. In other words, after "insets.top = normalizedY;", add "insets.bottom = 0;"

This worked for me in my own app, aswell as in the demo app provided by Mazyod.

ivanlovrenovic avatar Mar 25 '16 19:03 ivanlovrenovic

insets.bottom = 0 is ready for the bug

Agoer avatar Jul 14 '16 10:07 Agoer