Question

I am using ECSlidingMenu with my project and I need to change rootview manually so I use this code

UINavigationController *transferView = [self.storyboard instantiateViewControllerWithIdentifier:@"Transfer"];

        [self.slidingViewController anchorTopViewOffScreenTo:ECRight animations:nil onComplete:^{
            CGRect frame = self.slidingViewController.topViewController.view.frame;
            self.slidingViewController.topViewController = transferView;
            self.slidingViewController.topViewController.view.frame = frame;
            [self.slidingViewController resetTopView];
        }];

after resetTopView , I got black weird bar as you see in image.

If I run the code (Change RootView Again) black bar will grow higher.

Does anyone undergo this issue?

Screenshot

Was it helpful?

Solution

Just change code to be like this.

ECSlidingViewController *slidingViewController = self.slidingViewController;

[slidingViewController anchorTopViewOffScreenTo:ECRight animations:nil onComplete:^{
    CGRect frame = slidingViewController.topViewController.view.frame;
    slidingViewController.topViewController = transferView;
    slidingViewController.topViewController.view.frame = frame;
    [slidingViewController resetTopView];
}];

this solve problem. I have no idea why... but it's worked.

Thank you :--> Switching views with ECSliding without navigation menu

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top