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

Unbalanced calls to begin/end appearance transitions using non-animated setCenterViewController:withCloseAnimation:completion: #66

Merged
merged 2 commits into from
Aug 13, 2013

Conversation

kcharwood
Copy link
Contributor

If you call this method to set the centre view controller with withCloseAnimation set to NO you will see log messages about "Unbalanced calls to begin/end appearance transitions ... ". It appears in this case MMDrawerController calls the transition methods twice on the current center, i.e.:

beginAppearanceTransition:animated:
beginAppearanceTransition:animated:
endAppearanceTransition
endAppearanceTransition

They are called both in this method directly and also in a nested call to setCenterViewController:animated: because animated is NO. I've worked around this by changing the center controller by setting the property directly (which just calls the private setCenterViewController:animated:).

@kcharwood
Copy link
Contributor

Thanks for the issue. I'll try and take a look today, unless you have a pull request ready to fix it.

@kcharwood
Copy link
Contributor

Also found the other close method had some unbalanced calls.

@larsacus for the review?

@emichaud
Copy link

emichaud commented Aug 8, 2013

Hi I was wondering if this correction was going to be merged soon? I have a place where I want the drawer change to occur all in code and I'm getting unbalanced message as well as the animation is stopping open and not finishing. I've done this as a workaround. assuming this is the right approach (minus the workaround)

[self toggleDrawerSide:MMDrawerSideLeft animated:animated completion:^(BOOL finished) {

    if (finished) {
            [self setCenterViewController:self.appCenterController];
            [self closeDrawerAnimated:YES completion:nil];
    }
}];

note: it does "finish" because I get the controller change, just not the drawer close.
be well

EDIT:

It seems if I use this method instead - inside the toggleDrawerSide block, works as advertised.
I think that is what was reported.
thanks - sorry.

    [self setCenterViewController:me withFullCloseAnimation:YES completion:^(BOOL finished) {
        NSLog(@"finished animation");
    }];

kcharwood added a commit that referenced this pull request Aug 13, 2013
…view

Unbalanced calls to begin/end appearance transitions using non-animated setCenterViewController:withCloseAnimation:completion:
@kcharwood kcharwood merged commit 5e0061c into master Aug 13, 2013
@kcharwood kcharwood deleted the unbalanced_calls_for_center_view branch August 13, 2013 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants