andreamazz/SlideOutNavigation

Slide animation

iesta opened this issue · 5 comments

Hi,
Great control :-)
Would it be easy to add a slide animation for the menu ?
Thank you !

Hi @iesta, thanks! What do you mean by slide animation? Let the menu slide over the content or have it slide from the left with the content controller?
The second option is definitely feisable, I'll work on it.

Yes i was thinking about the second option. Wunderlist app does it.
I have tried to do it myself but i do not really understand how it works...

Hi @iesta, check commit efc6d98
The animation is disabled by default. You can enable it easily in the options:

                       AMOptionsAnimationShrink: @NO,
                       AMOptionsAnimationDarken: @NO,
                        AMOptionsAnimationSlide: @YES,
              AMOptionsAnimationSlidePercentage: @0.3f,

This mimics the behaviour of Wunderlist.
I have to make some other adjustments to the component, so I'll push the new version to cocoapods tomorrow, in case you use it.

🍻

Hi
Thank you very much.
I will test that now :-)
I have a small question for you as i want to use your slider in an app but
i d' like to add some stuff to the navigation bar (like a dynamic button
like a cart on the right side).
What do you think would be the best way ?
Thanks in advance,

Hi @iesta, you can access the navigation bar as you would in every other iOS application. To add a button on the right you can use something like this in any controller handled by the slideout controller:

    [self.navigationItem setRightBarButtonItem:button];

Where button is a UIBarButtonItem instance.

You can also customize the navbar appearance using the static class appearance:

    [[UINavigationBar appearance] setTintColor:[UIColor redColor]];

It behaves like a normal UINavigationController.