Skip to content

Instantly share code, notes, and snippets.

@jonmorehouse
Created June 28, 2014 18:31
Show Gist options
  • Save jonmorehouse/24b3f27465fbbd81b755 to your computer and use it in GitHub Desktop.
Save jonmorehouse/24b3f27465fbbd81b755 to your computer and use it in GitHub Desktop.
class UINavigationController
alias_method :superPopViewControllerAnimated, :popViewControllerAnimated
def popViewControllerAnimated(animated)
# call the will_present method of parent
if self.viewControllers[0].respond_to? :will_appear
self.viewControllers[0].send(:will_appear)
end
# on_presented not being called
superPopViewControllerAnimated animated
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment