From f2d50da1f635ddc55b44d773850e58d1ea2d9612 Mon Sep 17 00:00:00 2001 From: Aryan Date: Fri, 28 Nov 2014 12:24:45 -0800 Subject: [PATCH] Fixed #93. Make sure that when the menu is changed the old view is removed --- SlideMenu/Source/SlideNavigationController.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/SlideMenu/Source/SlideNavigationController.m b/SlideMenu/Source/SlideNavigationController.m index 37089f8..091ea91 100644 --- a/SlideMenu/Source/SlideNavigationController.m +++ b/SlideMenu/Source/SlideNavigationController.m @@ -851,4 +851,18 @@ static SlideNavigationController *singletonInstance; _menuRevealAnimator = menuRevealAnimator; } +- (void)setLeftMenu:(UIViewController *)leftMenu +{ + [_leftMenu.view removeFromSuperview]; + + _leftMenu = leftMenu; +} + +- (void)setRightMenu:(UIViewController *)rightMenu +{ + [_rightMenu.view removeFromSuperview]; + + _rightMenu = rightMenu; +} + @end