0

I am getting this console log when running my game with a newly inserted segue between two controller views. The game works perfectly but this log keeps repeating itself many times a second.

2015-02-10 14:58:31.496 TestGame[64786:7741533] Warning: Attempt to 
present <TestGame.SecondViewController: 0x7f86615fa0d0> on 
<TestGame.GameViewController: 0x7f865b60dff0> whose view is not in the
window hierarchy!

Does anyone know why this is happening? Is it anything to be concerned about?

EDIT The log starts happening as soon as my second view controller (game over screen) is called when a collision is detected:

func collision(Bee:SKSpriteNode, Player:SKSpriteNode) {
    self.viewController.gameOver()
}
sangony
  • 11,636
  • 4
  • 39
  • 55
bandoy123
  • 253
  • 4
  • 12

1 Answers1

0

From the code you supplied it looks like you might be handling your own collision logic. That means there is a chance that game over could be called every loop and I am guessing that triggers a segue. I would try throwing a log in collision and see if I gets called more times than you expect.

Hope that helps.

Skyler Lauren
  • 3,792
  • 3
  • 18
  • 30