romaonthego / RESideMenu

iOS 7/8 style side menu with parallax effect.
MIT License
7.09k stars 1.35k forks source link

black status bar when open side menu #315

Open AhmedOsman00 opened 6 years ago

AhmedOsman00 commented 6 years ago

when I open side menu a black view appears instead of status bar only on iOS 10

Riton2013 commented 5 years ago

Me,too. How to fix it if anyone knows that ?

chwastek commented 3 years ago

if only somebody resolved that...

chwastek commented 3 years ago

ok, so for the legacy knowledge what I have done to solve it:

  1. I have this view controller
    @interface RootVC () <RESideMenuDelegate>
    @property (nonatomic, strong) UIViewController *contentVC;
    @end
  2. I created this little handy bit for crafting a side menu view controller
    - (RESideMenu *)configuredSideMenuVCWithMenu:(UIViewController *)menuVC {
    RESideMenu *sideMenuViewController = [[RESideMenu alloc] initWithContentViewController:self.contentVC leftMenuViewController:nil rightMenuViewController:menuVC];
    // Here I change all sorts of parameters like shadows, colors, etc.
    return sideMenuViewController;
    }
  3. and finally I changed the background color to the desired value after hiding the menu (you can change it in other delegate methods if you play with shadows like I did inside my configuredSideMenuVCWithMenu)
    - (void)sideMenu:(RESideMenu *)sideMenu didHideMenuViewController:(UIViewController *)menuViewController {
    self.contentVC.view.backgroundColor = UIColor.whiteColor;
    }