diff --git a/MFSideMenu/MFSideMenuContainerViewController.m b/MFSideMenu/MFSideMenuContainerViewController.m index 70216e0..547d75b 100644 --- a/MFSideMenu/MFSideMenuContainerViewController.m +++ b/MFSideMenu/MFSideMenuContainerViewController.m @@ -10,6 +10,7 @@ #import NSString * const MFSideMenuStateNotificationEvent = @"MFSideMenuStateNotificationEvent"; +CGFloat const CENTER_VIEW_WIDTH_WHEN_MENU_OPEN = 50.0f; typedef enum { MFSideMenuPanDirectionNone, @@ -79,7 +80,7 @@ - (void)setDefaultSettings { self.menuContainerView = [[UIView alloc] init]; self.menuState = MFSideMenuStateClosed; - self.menuWidth = 270.0f; + self.menuWidth = [UIScreen mainScreen].bounds.size.width - CENTER_VIEW_WIDTH_WHEN_MENU_OPEN; self.menuSlideAnimationFactor = 3.0f; self.menuAnimationDefaultDuration = 0.2f; self.menuAnimationMaxDuration = 0.4f;