ios - Presenting a new viewController doesn't seem to unload the previous -


the game i'm developing consists of main menu, , game viewcontroller separately.

however when moving game screen menu screen, seems if class files previous viewcontroller still in effect?

for example, players start game tapping anywhere on screen whilst in game viewcontroller, causes new bar "launched", in turn plays small tone varies depending on direction. when returning main menu after game on (achieved pressing button present menu viewcontroller), tapping anywhere on menu screen seems start game again game viewcontroller?

by this, mean bar launch sound played, despite there being no code available in main menu viewcontroller play said sound, pressing play on menu take game screen, game has been reset, until tapping again, sound plays implying new bar launched, despite images being invisible.

i made sure that, when leaving view, wipe subviews view, whenever screen loaded there's nothing being covered up. tried dismissing previous view controller, nothing seems take effect. so, can't tell whether views being removed or what... it's mind breaking me.

unfortunately descriptions aren't doing myself justice, video demonstration out. note @ beginning, tapping screen show no sound played, of course won't visible.

edit: you'll notice when returning menu, tapping screen seems mess moving bar in background, despite gamebarmovement timer being invalidated upon moving game menu. fact they're using separate class files should mean bars shouldn't effected? knowing me, i've missed obvious.

this how uiviewcontroller life-cycle works far know. uiviewcontrollers aren't unloaded until app starts running out of memory. need way, in game vc, stop game loop running , resume once new game started.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -