I want to build a fairly simple app with just 1 screen. As a result, I would like two views within the same view controller.
View1 - appear for 5 seconds
View2 - appear during gameplay
View1 - appear for 5 seconds
View2 - appear during gameplay
And so on.
Though I don’t know how to make this happen, I am sure this design pattern is valid.
I searched documentation but can’t find definite answer.
I know apps which does this, but how, I don’t know.
Is it viewcontroller.view = View1 or View2? If so, how would I make this switch with some nice animation?
I know of animations but not in this kind of case. Please help…
Add the two views as subviews of your viewController’s view:
Then use an animation block:
to replace view1 with view2. And so on.