Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rootViewController Shadow is gone after replacing rootViewController #41

Closed
kennyevo opened this issue Feb 24, 2016 · 2 comments
Closed

Comments

@kennyevo
Copy link

If you replace the rootViewController after initializing the whole thing, the shadow is missing.

At first I initialize the menuController with a navigation controller, and there's a button which replaces the navigationcontroller with an other one, after I've replaced the rootViewController of the LGSideMenuController, the shadow is gone when the left or right side menu is shown.

@Kiratijuta
Copy link

You have to re-insert the _rootViewStyleView right after you assign the new rootViewController. And if you want the clover colour for the left view, you need to re-insert the _leftViewCoverView as well.

Basically, this is the one that i created, you just call the one below;

- (void)updateShadow
{
    [_rootViewStyleView removeFromSuperview];
    [self.view insertSubview:_rootViewStyleView belowSubview:_rootVC.view];

    [_leftViewCoverView removeFromSuperview];
    [self.view insertSubview:_leftViewCoverView aboveSubview:_leftView];
    _leftViewCoverColor = kLGSideMenuCoverColor;
}

This function was written in the LGSideBarMenuController.m

@vinecole27
Copy link

this issue still exists when replace root view controller

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants