Attempt to present UIViewController on UIViewController whose view is not in the window hierarchy

后端 未结 30 3519
一整个雨季
一整个雨季 2020-11-21 23:39

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

Warning: Attempt to present < finishViewController: 0x1e56e0a0 > on < ViewCont

30条回答
  •  不要未来只要你来
    2020-11-22 00:09

    I found this bug arrived after updating Xcode, I believe to Swift 5. The problem was happening when I programatically launched a segue directly after unwinding a view controller.

    The solution arrived while fixing a related bug, which is that the user was now able to unwind segues by swiping down the page. This broke the logic of my program.

    It was fixed by changing the Presentation mode on all the view controllers from Automatic to Full Screen.

    You can do it in the attributes panel in interface builder. Or see this answer for how to do it programatically.

提交回复
热议问题