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

Show the navigation bar programmatically #105

Open valzevul opened 8 years ago

valzevul commented 8 years ago

Hello, Thank you very much for your control. I was wondering, is it possible to show the navigation bar programmatically (when a user presses a button, not during the scroll)?

Sorry if I've missed the info in the documentation.

Mazyod commented 8 years ago

Hi, thanks for using it! The only way right now is to probably set disable to YES, then back to NO, but that's not ideal. I thought there was an issue already open for that.. Since there isn't, I'll leave this and hopefully get to it soon, it's definitely something good to have.

BenchR267 commented 8 years ago

It would also be great make this animatable. Also thank you for this framework! It's awesome!

tiois commented 8 years ago

Setting disable to true then false didn't do it.

What I did is expose a new method in TLYShyNavBarManager. Here is how I did it :

In TLYShyNavBarManager.h, add the following line :

- (void)expand;

In TLYShyNavBarManager.m, add the following lines below the - (void)cleanup method :

- (void)expand
{
    [self cleanup];
}

And then to show the shyNavBar, simply call self.shyNavBar.expand().