nverinaud/NVSlideMenuController — pull request #7 by DavidBarry (2013-04-06 22:55:30+00:00)
Title: Add option to bounce the content view when navigation.

This adds a `BOOL` flag `bounceWhenNavigating` as well as the method `- (void)closeMenuBehindContentViewController: animated: bounce: completion:`. Setting `bounceWhenNavigating` to `YES` or passing `YES` to the bounce parameter will cause the content view to bounce off screen briefly before swapping out the new content view controller and sliding back into the closed position. This mimics the behavior seen in Path when selecting an item from the menu.

When bouncing has been enabled it will usually look bad if the menu isn't as wide as the `SlideMenuController`'s view. To help with this I added another bool flag `autoAdjustMenuWidth` that will prevent `NSSlideMenuController` from resizing the menu to compensate for `contentViewWidthWhenMenuIsOpen` and will instead ensure that the menu is always as wide as `NSSlideMenuController`'s view. This is controlled independently of `bounceWhenNavigating` so that the user isn't forced to give up the menu resizing when using bouncing.

I've also added some switches in the Demo app to demonstrate the functionality.

`bounceWhenNavigating` defaults to `NO` and `autoAdjustMenuWidth` defaults to `YES` to preserve the previous behavior in default configurations.