Skip to content

Instantly share code, notes, and snippets.

@mikeabdullah
Created November 21, 2014 19:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeabdullah/bdd5e30ad856fa79ee87 to your computer and use it in GitHub Desktop.
Save mikeabdullah/bdd5e30ad856fa79ee87 to your computer and use it in GitHub Desktop.
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