telly / TLYShyNavBar

Unlike all those arrogant UINavigationBar, this one is shy and humble! Easily create auto-scrolling navigation bars!
MIT License
3.73k stars 427 forks source link

Statusbar is gone / get "overlapped" #184

Open EternalBlack opened 7 years ago

EternalBlack commented 7 years ago

I followed the instructions and setup an UIViewController that has an UITableView inside it (as well as an SearchDisplayController).

As soon as I do self.shyNavBarManager.scrollView = self.patientTableView where self.patientTableView is a reference to my TableView it "all" works as expected but unfortunately the StatusBar( i.e. the bar that holds the current time in the middle as well as battery percentage on the right - etc.) is "gone". By "gone" I mean it the writings are still there shyNavBarManager doesn't seem to recognize the height and scrollt behind it, making the UIBarButtons inside the NavigationController intersect with the statusbar wiriting (battery percentage etc).

My project is written in Swift 3, as well as delegate and source are getting set beforehand.

zanesc commented 7 years ago

@EternalBlack I am having this problem as well. Did you find a fix?

EternalBlack commented 7 years ago

@zanesc At first I switched over to AMScrollingNavbar which worked fine at first but I had some issues with my controller setup (nav controller problems etc.). In the end I ditched it as it wasn't worth the trouble (it was more like a cosmetic feature only in a small place in my app). But I would recommend AMScrollingNavbar over this one as it seems more mature and the setup is more straightforward (at least for me it was).

joshbernfeld commented 7 years ago

Go into TLYShyStatusBarController.m and delete the following lines of code. I was experiencing this issue on a presented view controller.

    if (viewController.presentingViewController != nil)
    {
        return 0.f;
    }
ghost commented 6 years ago

I also receive this behaviour out of the box with just the standard integration.

The workaround suggested by @joshbernfeld works, however should be implemented as a PR instead of a hack.