I’m planing to write simple iOS game and I’m curious which view control to use.
The application will have four views. In the first view the user can select the number of players for the game. In the second view there will be a option to populate players names. Then in the third view the player name will be randomly selected. Then the fourth view is loaded with question. When the device is shaked the third view will appear and so on.
The first and the second views will be used only once while the app is running.
In this scenario I can use:
- UINavigationViewController
- Set UIViewController as rootViewController and then add/remove views from the superview.
Which is the right approach in this situation ?
If I use UINavigationViewController there will be two, only once used views (first and second, which I believe they will in memory while the app is running)
I’d stick with the
UINavigationController– it’s widely used, and there’s no point re-inventing the wheel (especially when this particular wheel is used in almost every app).Going by your description, nothing you’re trying to do couldn’t be done with a navigation controller, and pushing/popping/setting view controllers on its navigation stack.