Skip to content

Commit

Permalink
Merge pull request mutualmobile#363 from novkostya/bugfix/missing-app…
Browse files Browse the repository at this point in the history
…earance-transition

Add missing appearance transition forwarding
  • Loading branch information
kcharwood committed Apr 7, 2015
2 parents 5ca3f2e + 6f4af42 commit 205aa03
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions MMDrawerController/MMDrawerController.m
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,18 @@ -(void)setCenterViewController:(UIViewController *)newCenterViewController withC
}

BOOL forwardAppearanceMethodsToCenterViewController = ([self.centerViewController isEqual:newCenterViewController] == NO);

UIViewController * oldCenterViewController = self.centerViewController;
if (animated && forwardAppearanceMethodsToCenterViewController) {
[oldCenterViewController beginAppearanceTransition:NO animated:NO];
}

[self setCenterViewController:newCenterViewController animated:animated];

if (animated && forwardAppearanceMethodsToCenterViewController) {
[oldCenterViewController endAppearanceTransition];
}

if(animated){
[self updateDrawerVisualStateForDrawerSide:self.openSide percentVisible:1.0];
if (forwardAppearanceMethodsToCenterViewController) {
Expand Down

0 comments on commit 205aa03

Please sign in to comment.