Skip to content

Instantly share code, notes, and snippets.

Created May 4, 2013 10:14
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 anonymous/93242d562263bbf132eb to your computer and use it in GitHub Desktop.
Save anonymous/93242d562263bbf132eb to your computer and use it in GitHub Desktop.
SO Question "UIViewController -dealloc method not called"
UIViewController *myContr = [UIViewController new];
myContr.view.backgroundColor = [UIColor redColor];
//self.view.superview = UIWindow , not a clean solution but works for the sake of this example
[self.view.superview addSubview:myContr.view];
[self.view removeFromSuperview];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment