devindoty/DDMenuController — Issue #1: Showing the root controller without an animation doesn't clear flags
Author: mchambers
Created: 2011-12-07 07:58:34+00:00
State: open

Issue occurred for me when dismissing the right view with a pan gesture, then attempting to push a view controller onto the navigation stack. You'd end up with a black screen because pushViewController thought the right view was still showing.

swap this code:

if (!animated) {
self.view.frame = frame;
return;
}

for this code:

if (!animated) {
self.view.frame = frame;

if (self.leftController && self.leftController.view.superview) {
[self.leftController.view removeFromSuperview];
}

if (self.rightController && self.rightController.view.superview) {
[self.rightController.view removeFromSuperview];
}

_menuFlags.showingLeftView = NO;
_menuFlags.showingRightView = NO;

[self showShadow:NO];

return;
}

fixed it for me.