Skip to content

Instantly share code, notes, and snippets.

@anknetau
Created February 3, 2016 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anknetau/68286e66fc38e2252bf0 to your computer and use it in GitHub Desktop.
Save anknetau/68286e66fc38e2252bf0 to your computer and use it in GitHub Desktop.
Remove a child view controller
UIViewController *vc = self.childViewControllers[3]; // or whatever
[vc willMoveToParentViewController:nil];
[vc.view removeFromSuperview];
[vc removeFromParentViewController];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment