TLYShyNavBar icon indicating copy to clipboard operation
TLYShyNavBar copied to clipboard

Usage in TabBarController

Open vito-royeca opened this issue 8 years ago • 4 comments

Can I use this inside a UITabBarController?

vito-royeca avatar Apr 06 '16 07:04 vito-royeca

This is already a confirmed bug, check issue #102. No solution has yet been published by Mazyod but I found a fix that may be used if you would like to use it in a TabBarController. Remember that the fix was written for my own app to use TLYShyNavBar and may not work with your solution (depending on how your view is constructed). Here is my solution that i wrote as a comment on issue #102.

"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 Apr 07 '16 06:04 ivanlovrenovic

Thanks by the way. I did what you suggested, but then the nav bar will not scroll up anymore.

vito-royeca avatar Apr 08 '16 01:04 vito-royeca

Hmm, strange. Must be your setup then, because it worked for me in my own app aswell as in the demo-app. Have you tried the fix on the demo app? Did or work? Sorry that i cant be anymore of a help, it's hard to help you without any line of code im afraid.

ivanlovrenovic avatar Apr 08 '16 06:04 ivanlovrenovic

Well, my table view is inside a navigation controller which is inside a tab bar controller.

I tried the fix by adding "insets.bottom = 0;" inside the TLYShyScrollViewController.m itself.

Please take a look at the FeaturedViewController.swift in my project:

Cineko

vito-royeca avatar Apr 08 '16 06:04 vito-royeca