0

SKview A holds SKscene A, have a button that removes SKview A SKscene A and at the same time pushes SKview B that holds SKscene B. :)

Thank you so much for the help!!!

sangony
  • 11,636
  • 4
  • 39
  • 55
Xofear
  • 210
  • 1
  • 8
  • possible duplicate of [How to dismiss SKScene?](http://stackoverflow.com/questions/21920308/how-to-dismiss-skscene) – sangony May 15 '14 at 20:53
  • @sangony The problem with just removing the Skscene and not the skview is some allocated memory won't be deallocated. Apple told me this. – Xofear May 15 '14 at 21:03
  • 1
    sure, do you have the exact wording and can post it here? I call this a simple misunderstanding. – CodeSmile May 15 '14 at 21:50
  • @LearnCocos2D lol let me try again. SKview A holds SKscene A, have a button that removes SKview A, SKscene A and at the same time pushes SKview B holds SKscene B. :) thank you so much for the help! – Xofear May 15 '14 at 22:31
  • This answer works for my problem! http://stackoverflow.com/questions/21578391/presenting-uiviewcontroller-from-skscene – Xofear May 16 '14 at 02:03
  • 1
    You should really really just present a new scene, and even if there were a bug that leaks memory it's Apple's job to fix that (and if they are aware of it as you implied, it will get fixed). When you throw away the entire view, you also throw out all the assets Sprite Kit has already cached, which means they need to be reloaded from disk, which can be quite time consuming. – CodeSmile May 16 '14 at 13:01
  • @LearnCocos2D Even with removing the the entire view, and loading new views and scenes. The app still runs very fast. Funny thing is that some allocated texture will still stay in memory, this is normal because i used initWithImage. Apple told me thats just how spriteKit works. :) – Xofear May 18 '14 at 23:14

0 Answers0