First, you need to figure out when you want the different views to be displayed (what decides whether the first view or second view is displayed?). When developing, it's a good idea to always have a high-level design of what you want to accomplish, written in plain English or otherwise easily understandable. From there, it will be much easier to code.No not quite, i mean what do i do if i want to show 20 views?
For example,
"I want the user to enter a number, which will determine the view to display."
Assuming 3 views, this could be roughly pseudo-coded as:
Code:
...
get user input and store to viewNum
...
if (viewNum is 1)
display ViewOne
else if (viewNum is 2)
display ViewTwo
else
display ViewThree
...
Once you have a design laid out, it's just a matter of replacing your pseudocode with the actual code.