I'm building a very simple iOS game that doesn't require any OpenGL
; I'd like to stick with Core Graphics & Core Animation.
It seems as though I need two types of ViewControllers: Basic VCs for navigating between menu screens (ie. Settings, Main Menu, Level Select, etc.), and Gameplay VCs for managing all my UIViews
and CALayers
.
What's a good way to manage/exchange these Views & VCs to preserve performance? Is it best practice to have one hierarchy of VCs like a traditional UINavigationController
-based app, covering the NavBar when I'm displaying a Game VC? Or instead should I be removing all other ViewControllers from the stack when I enter "game mode", and setting it as my window.rootViewController
property? Any alternatives / downsides to continually resetting window.rootViewController
?
My gut tells me the latter is better on resources+performance, but it seems heavy handed. Any advice + direction here would be appreciated.
Thanks