romaonthego / RESideMenu

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

[Issue] Status bar style update. #124

Open markst opened 10 years ago

markst commented 10 years ago

When changing the content view controller, the status bar style is not updated.

markst commented 10 years ago

I can subclass RESideMenu and perform setNeedsStatusBarAppearanceUpdate when the content view controller changes. However if set with an animation, the reference to the contentViewContainer is not updated until the animation block is complete.

bizibizi commented 10 years ago

yep, I have the same

zvving commented 10 years ago

see #128

markst commented 10 years ago

Cheers, this pull request fixes for me. Usual approach is for didMoveToParentViewController: to occur after animation is complete? Also wonder if 'UINavigationController' category should be the developers responsibility to implement, rather than implicit.

danielborges93 commented 8 years ago

I am getting the same problem. My contentViewController (ProfileViewController) implements

override func preferredStatusBarStyle() -> UIStatusBarStyle {
    return .LightContent
}

And I am doing this to show the new contentViewController:

let profileViewController = ProfileViewController()
let navigationController = UINavigationController(rootViewController: profileViewController)
self.sideMenuViewController.setContentViewController(navigationController, animated: true)
self.sideMenuViewController.hideMenuViewController()

In my RESideMenu instance I have:

sideMenuViewController.menuPreferredStatusBarStyle = .LightContent

But when the side menu dismisses, the status bar stays black.