Skip to content

Instantly share code, notes, and snippets.

@a-voronov
Created May 15, 2017 23:29
Show Gist options
  • Save a-voronov/7ff40e0f4724a897e73f8032ef0ccad9 to your computer and use it in GitHub Desktop.
Save a-voronov/7ff40e0f4724a897e73f8032ef0ccad9 to your computer and use it in GitHub Desktop.
Causing recursive method call by creating method named removeChildViewController (probably conflicting with private api 🤔)
extensions UIViewController
func removeChildViewController(childViewController: UIViewController) {
childViewController.willMoveToParentViewController(nil)
childViewController.view.removeFromSuperview()
childViewController.removeFromParentViewController()
}
}
@a-voronov
Copy link
Author

screen shot 2017-05-16 at 02 11 48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment