Fix under navigation controller animations

This commit is contained in:
MrBendel
2013-01-15 13:40:57 -05:00
committed by Mike Enriquez
parent f3b3220079
commit c29ec931f7

View File

@@ -130,8 +130,6 @@ NSString *const ECSlidingViewTopDidReset = @"ECSlidingViewTopDidRese
[self.underLeftViewController didMoveToParentViewController:self];
[self updateUnderLeftLayout];
[self.view insertSubview:_underLeftViewController.view atIndex:0];
}
}
@@ -148,8 +146,6 @@ NSString *const ECSlidingViewTopDidReset = @"ECSlidingViewTopDidRese
[self.underRightViewController didMoveToParentViewController:self];
[self updateUnderRightLayout];
[self.view insertSubview:_underRightViewController.view atIndex:0];
}
}
@@ -530,9 +526,9 @@ NSString *const ECSlidingViewTopDidReset = @"ECSlidingViewTopDidRese
dispatch_async(dispatch_get_main_queue(), ^{
[[NSNotificationCenter defaultCenter] postNotificationName:ECSlidingViewUnderLeftWillAppear object:self userInfo:nil];
});
self.underRightView.hidden = YES;
[self.underRightView removeFromSuperview];
[self.underLeftViewController viewWillAppear:NO];
self.underLeftView.hidden = NO;
[self.view insertSubview:self.underLeftView belowSubview:self.topView];
[self updateUnderLeftLayout];
_underLeftShowing = YES;
_underRightShowing = NO;
@@ -543,9 +539,9 @@ NSString *const ECSlidingViewTopDidReset = @"ECSlidingViewTopDidRese
dispatch_async(dispatch_get_main_queue(), ^{
[[NSNotificationCenter defaultCenter] postNotificationName:ECSlidingViewUnderRightWillAppear object:self userInfo:nil];
});
self.underLeftView.hidden = YES;
[self.underLeftView removeFromSuperview];
[self.underRightViewController viewWillAppear:NO];
self.underRightView.hidden = NO;
[self.view insertSubview:self.underRightView belowSubview:self.topView];
[self updateUnderRightLayout];
_underLeftShowing = NO;
_underRightShowing = YES;
@@ -559,6 +555,8 @@ NSString *const ECSlidingViewTopDidReset = @"ECSlidingViewTopDidRese
[self.topView removeGestureRecognizer:self.resetTapGesture];
[self removeTopViewSnapshot];
self.panGesture.enabled = YES;
[self.underRightView removeFromSuperview];
[self.underLeftView removeFromSuperview];
_underLeftShowing = NO;
_underRightShowing = NO;
_topViewIsOffScreen = NO;