I read SO about another user encountering similar error, but this error is in different case.
I received this message when I added a View Controller initially:
I found that, if you are using a storyboard, you will want to put the code that is presenting the new view controller in viewDidAppear. It will also get rid of the "Presenting view controllers on detached view controllers is discouraged" warning.