input field: correct answer redirect?

Joined
Oct 9, 2011
Messages
1
Reaction score
0
Points
1
I'm creating an iPhone app that needs to display text on a page and have an input field at the top with a "Next" button to the right of it. When the user enters a specific word or words and tap Next, they are taken to a new page that displays text, an input field and Next button (same thing as the first screen but with different text). This will go on for 10 separate screens.

How do I set up the 10 different pages in Xcode.

Also, code for the input field recognition & redirect would be helpful ; ).

You are my angel!
 
Joined
Feb 25, 2009
Messages
2,112
Reaction score
71
Points
48
Your Mac's Specs
Late 2013 rMBP, i7, 750m gpu, OSX versions 10.9.3, 10.10
There really is no point in having 10 view controllers and associated views. You'd be better off storing the text in a plist (perhaps as an array of dictionaries, each entry one being the text the other being the correct text to type in), load the plist into an array, have a single view controller that will have your text input field and the text view.

Display the appropriate text in the text view, when the person enters the correct text in the text field, either instantiate a new copy of the view controller and pass it the data for the next field, or continue to use the existing one, change the text in the display area and clear out the text field to ask for the next response.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top