Create a gist now

Instantly share code, notes, and snippets.

Querying if root view controller is being dismissed
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
UIViewController *root = self.presentingViewController.presentedViewController;
if (root.isBeingDismissed) {
[self.view endEditing:YES];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment