Attempt to present UIViewController on UIViewController whose view is not in the window hierarchy
Asked 07 September, 2021
Viewed 1.1K times
  • 59
Votes

Just started using Xcode 4.5 and I got this error in the console:


  

Warning: Attempt to present < finishViewController: 0x1e56e0a0 > on < ViewController: 0x1ec3e000> whose view is not in the window hierarchy!

The view is still being presented and everything in the app is working fine. Is this something new in iOS 6?

This is the code I'm using to change between views:

UIStoryboard *storyboard = self.storyboard;
finishViewController *finished = 
[storyboard instantiateViewControllerWithIdentifier:@"finishViewController"];

[self presentViewController:finished animated:NO completion:NULL];

30 Answer