Closed DavidBarry closed 11 years ago
Sorry for my non-reactivity on this one. Could you please squash your commits? Thanks for your contribution, when squashed I'd merge this great stuff :)
Just rebased onto develop and squashed the commits. Let me know if this looks good.
Well done! I've included your changes in the 1.5.0. And it's available through cocoapods from now :+1:
Thanks Nicolas.
This adds a
BOOL
flagbounceWhenNavigating
as well as the method- (void)closeMenuBehindContentViewController: animated: bounce: completion:
. SettingbounceWhenNavigating
toYES
or passingYES
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 flagautoAdjustMenuWidth
that will preventNSSlideMenuController
from resizing the menu to compensate forcontentViewWidthWhenMenuIsOpen
and will instead ensure that the menu is always as wide asNSSlideMenuController
's view. This is controlled independently ofbounceWhenNavigating
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 toNO
andautoAdjustMenuWidth
defaults toYES
to preserve the previous behavior in default configurations.