ViewController for an iOS quiz app

200 views Asked by At

maybe is a stupid question but I cannt find a solution.

I'm a newbie developer and I develop iOS apps using RubyMotion.

I'm creating a quiz app: when a user start a quiz I init a UIviewcontroller with the first question and 3 buttons with the possible answers.

User select an answer and go to the next question increasing a progress bar.

Now I have a doubt: can I use UIViewController or I have to use UIPageViewController?

If I use UIViewController with 50 questions I have to init 50 controller: is not dangerous for resources? Or is better to destroy a controller when I create the controller for the next question?

Thank you (and sorry if the question is obvious)

1

There are 1 answers

1
Pandey_Laxman On BEST ANSWER

No you can use one ViewController object because you will have same UI one every page like Progressbar, Question Label and 3 Buttons.

If an user select an Answer you need to update the new question label and 3 buttons options with some Progress on progressbar and display activityIndicatorview to Refresh the Page for new question or some custom animation.