-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Tweaks to appearence transitions handling on setCenterViewController* methods #139
Tweaks to appearence transitions handling on setCenterViewController* methods #139
Conversation
… methods - Fixes missing `[oldCenterViewController willMoveToParentViewController:nil]` - Fixes missing edge case on setCenterViewController:with(Full)CloseAnimation which resulted in view*Disappear methods not being called - Fixes edge case which resulted in view*Appear methods being called twice - Reorganises begin/endAppearenceTransition methods to have a more systematic calling order (begin's on both VCs called before end's)
Adds a check that the container is actually visible before calling the appearance transitions. This prevents reduandant calls in the setCenterViewController* methods wrt to those called in the viewWillAppear, etc methods of MMDrawerController.
Thanks for the pull request! I've been traveling for the last couple of weeks, but I'll have some time this week to take a look at this and get it pulled in. |
MMDrawerController (0.5.1) What I patched in my code for now -- call explicitly beginAppearanceTransition, endAppearanceTransition after changing center view controller. |
I believe it will fix the issue. This was an edge case that was missed when the animated flag was YES, IIRC |
There are actually quite a few more changes in here than what I expected. I'm still trying to walk back up the tree of what the original problems were, and trying to isolate what parts of your pull request fix each issue you reported. The appearance transition code is tricky, so I also want to make sure there are no regression issues here. Thanks again for the pull. |
Also, I'm not sure I am able to reproduce the fullCloseAnimated problem you mention above. In the example, when I full close the center from a drawer, I get the following trace:
If I close with animated NO, I still get the same trace. What am I missing? What changes to the current example could I make that replicate the problems you were seeing? |
Ping @Club15CC |
Hi there, Sorry for the delay. I’m just finishing up a contract and will attempt to isolate this better when I have a moment. The problem occurs when you call the methods with code rather than use the menu. It’s certain combinations of
Particularly when you call with animated:YES but the drawer is already closed, I think, is when you get some problems. Through observation of the app and also by following the logic of the code, I believe there is at least one of these cases that result in view transition methods being called more than once as well as a scenario where some are not called. Hope this helps. Let me know… HKS On 28 Oct 2013, at 14:14, Kevin Harwood [email protected] wrote:
|
@Club15CC I think have the scenario with changing out the center controller when the drawer is closed addressed in #212. If you are able to reproduce other issues, please let me know! Thanks for taking the time to help debug this. 🍻 |
Relates to issue 138: #138
[oldCenterViewController willMoveToParentViewController:nil]