|
|
#1 |
|
Help. About organize view hierarchy in an app.
Hi all,
I really need some help and suggestions about organize the view hierarchy in my education app. In my app, it consists some view controllers as below: 1. Menu View Controller - consists level buttons example: 'Level 1', 'Level 2'. 2. Level View Controller - show the questions for each level. For example: When user click 'Level 1' button in Menu View Controller, this level view controller will show a view and display a number of questions let user answer. 3. Result View Controller - show the result once user finish answer the questions. In this result view controller, it consists (a) 'Play Again' button - Once click it, will switch back to Level View Controller so user can play again. (b) 'Back to Menu' button - Once press it, it will switch back to menu view controller. (c) 'Play Next Level' button - When click it, it will switch to Level View Controller which will show different set of questions. I am not sure how to organize these view controller in a better way since it always need switch between the existing view controllers. Before this I am adding a view controller as a subview of another view controller to achieve 'switch view' purpose but it seems not a good practice. Am I need use navigation controller? Currently I am reading the view controller programming guide. But really hope someone can share their idea, suggestion and experience. Any comments are welcome. Thanks a lot.
|
|
|
|
0
|
|
|
#2 | |
|
Quote:
You should also look into Storyboards. They're a good way to set up this sort of navigation without much coding: http://mobile.tutsplus.com/tutorials...k-storyboards/ |
||
|
|
0
|
|
|
#3 | |
|
Quote:
![]() If use UINavigationController I may need hide the navigation bar in Menu and Result View Controller and display most of the buttons example level buttons in UIButton form instead of the navigation bar button. Am I right? Yes, storyboard is quite helpful but I heard it may not run in previous version IOS device. Am I right? |
||
|
|
0
|
|
|
#4 | ||
|
Quote:
Quote:
|
|||
|
|
0
|
|
|
#5 | |
|
Quote:
But I have some questions regarding the navigation controller. 1. If use navigation controller, how to pop out more than one view controller ? Let's say I need go 2 steps back. For example, in my app I know how to switch from result view controller back to level view controller but not sure how to switch from result view controller back to menu view controller. 2. If I need include navigation bar in some of the view controllers only, so can I just hide the navigation bar when I don't want it and show it again if I need it to be seen ? Am I correct? Thanks.
|
||
|
|
0
|
|
|
#6 | ||
|
Quote:
But the better way is to use: popToViewController:animated: to go to a specific ViewController on the stack, or popToRootViewControllerAnimated: to go all the way to the root viewController. Quote:
|
|||
|
|
0
|
|
|
#7 | |
|
Quote:
|
||
|
|
0
|
|
|
#8 |
|
Be sure you've read the View Controller Programming Guide (something I suggested previously in another thread of yours).
__________________
|
|
|
|
0
|
|
|
#9 |
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 11:15 PM.







Linear Mode
