-
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
viewDidAppear called twice during state restoration #261
Comments
+1 This has been a major pain for our app to the point of us dumping MMDrawerController and writing our own Left Nav Controller. Would really like not to have to do that; but the powers that be are forcing our hand. Any help on this would be appreciated. |
A sporadic idea: maybe we should check |
Both #271 and #268 fix this issue. If I was to choose which one is better, I would choose #271 as it does not introduce another property and is thus a bit more elegant. It also fixes the double decodeObject call and potential reassignment of the same side controllers. Hope it will find its way into the next release |
Is there any hope these fixes will actually get merged in? |
👍 please merge it! |
👍 I have this problem too and it is pretty annoying. |
Sorry for being MIA... Work and Life get in the way of fun side projects :) I'll try and pull together another release here in the next week. 🍻 |
Closing. Take conversation to #271 |
I have a MMDrawerController that is pushed onto a UINavigationController stack not animated and I get multiple calls to viewWillAppear and viewDidAppear UPDATE: TLDR: Nevermind... |
In the center view controller (and, probably, others as well) viewDidAppear method is called twice when restoring state.
[self.centerViewController beginAppearanceTransition:YES animated:NO];
[self.centerViewController endAppearanceTransition];
in the (setCenterViewController: animated:) method of MMDrawerController.
a) [self.centerViewController beginAppearanceTransition:YES animated:animated]; in viewWillAppear
b) [self.centerViewController endAppearanceTransition]; in viewDidAppear
If the state is not getting restored, centre view controller's viewDidAppear is not called due to (1) and is only called due to (2).
I have tested and this is also the case with KitchenSink. I'd be happy to find a solution for this and issue a pull request, but I am stuck trying to understand why (1) calls viewDidAppear ONLY when restoring state.
The text was updated successfully, but these errors were encountered: