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

MGSplitViewController.m -viewWillAppear:animated causing master and child controllers own -viewWillAppear:animated methods to be called twice. #56

Open
lemonkey opened this issue Apr 10, 2012 · 2 comments

Comments

@lemonkey
Copy link

I'm seeing cases where whenever an instance of MGSplitViewController is presented, the MGSplitViewController instance's -viewWillAppear:animated method is called.

Within this method, there is logic that will call -viewWlilAppear:animated on both the masterViewController and the detailViewController, even though they will have already been sent this message as being children of the MGSplitViewController. The code as it stands now causes the child view controllers' -viewWillAppear:animated to be called twice.

This can be an issue if you're expecting -viewWillAppear:animated to be called once per event for the view controllers inside either master or detail.

@lemonkey
Copy link
Author

Note: this is confirmed in iOS 5.

@ghost
Copy link

ghost commented May 21, 2012

This should fix the issue, iOS 5 automatically forwards appearance and rotation methods to child view controllers.

-(BOOL)automaticallyForwardAppearanceAndRotationMethodsToChildViewControllers {
   return NO;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant